Opt-out testing for the human immunodeficiency virus (HIV) incorporates testing as a routine part of health care for all patients unless they refuse. The ethics of this approach to testing in sub-Saharan Africa is a source of controversy. Opt-out HIV testing is expected to improve survival by increasing case detection and thus linking more HIV-infected people to earlier treatment, provided there is effective patient follow-up and programme sustainability. At the population level, these benefits will likely outweigh the potential negative consequences of individuals experiencing HIV-related stigma. These justifications appeal to consequentialist moral theories that the acceptability of an action depends upon its outcomes. On the other hand, liberal moral theories state that the autonomy of individuals should always be protected unless restricting autonomy is necessary to protect the welfare of others. Opt-out consent may restrict autonomy and it is unclear whether it would benefit people other than those being tested. Yet, the doctrine of libertarian paternalism proposes that it is justifiable and desirable to use unobtrusive mechanisms to help individuals make choices to maximize their own welfare. Central to this idea are the premises featured by supporters of opt-out consent that individuals will not always make the best choices for their own welfare but they may be influenced to do so in ways that will not compromise their freedom of choice. Also important is the premise that all policies inevitably exert some such influence: opt-in consent encourages test refusal just as opt-out consent encourages acceptance. Based on these premises, opt-out testing may be an effective and ethically acceptable policy response to Africa's HIV epidemic.