As scientists prepare to meet in Vancouver, Canada, for the annual meeting of the International AIDS Society (IAS) on 19–22 July, many argue that the end of the AIDS epidemic could be in sight. A mass of convincing data, they say, shows that the universal roll-out of antiretroviral treatment provides a means to stop HIV — but only if the world acts fast.

The optimism is due to the apparent success of the ‘treatment as prevention’ approach. Treating people with antiretroviral drugs as soon as possible after their diagnosis, it seems, not only prevents death and disability due to the disease but also prevents virus transmission. In 2014, the United Nations Joint Programme on AIDS (UNAIDS) drew on this concept to set the ‘90-90-90’ goals, which envisage diagnosing and effectively treating 90% of people infected with HIV to eliminate the disease as a public-health threat by 2030.

In a report last month by a UNAIDS–Lancet commission, experts estimate that there is a five-year window of opportunity to make or break the 90-90-90 goals (see go.nature.com/ztqoj1). They note that the number of new infections is now declining year on year as more and more people receive antiretroviral treatment. As of 2013, nearly 13 million people were receiving antiretroviral drugs, a roughly tenfold increase over the previous decade. Should this trend continue, the Millennium Development Goal set in 2011, to get 15 million people on treatment by the end of 2015, will be exceeded.

Will this trend continue? There are 35 million people living with HIV, all of whom will eventually need antiviral therapy. Yet provision is too slow, the commission points out. It estimates that, if treatment is made accessible to new patients at the same rate as today, population growth in southern Africa will see the number of new infections and AIDS deaths per year creep up again by 2020. But if countries accelerate the provision of treatment in the next five years, the commission says, the goal of stopping the epidemic by 2030 is within reach.

Getting there will take a massive financial investment — as much as US$36 billion annually, compared with current investment of $19 billion per year. That represents as much as 2.1% of the gross domestic product of some affected nations.

“Treatment works for individual and public health, and for the public-health purse.”

Coaxing forth that level of investment in an age of austerity will be difficult. But, by modelling the economic gains of people remaining healthy and productive members of society, the commission estimates that countries with large HIV burdens will benefit from their increased spending.

As we report in a News Feature on page 146, scientists are also conducting research in ‘implementation science’, showing how to better provide treatment. And researchers are right to highlight results that definitively support an increase in investment as a means both to preserve health and to contain the epidemic by suppressing transmission.

The first major evidence supporting treatment as prevention came in 2011. A study called HPTN 052 found that providing treatment immediately on diagnosis to the infected partner of a couple regardless of whether his or her blood-cell count showed low numbers of the CD4 type of T cell — the usual marker of disease progression and indication for antiretroviral therapy — cut the risk that this person would transmit the virus to the uninfected partner by 96%.

Open questions, such as whether the approach would work in other settings, have now largely been answered. In February, the TEMPRANO trial in more than 5,000 people in Côte d’Ivoire reported that immediately starting antiretroviral treatment cut the risk of death and serious illnesses, such as tuberculosis and bacterial infections, by 44%. In May, the START trial, involving 4,685 people in 35 countries, was stopped early after reporting that immediate treatment cut the risk of serious illness or death by 53%. The trend was seen across low-, middle- and high-income countries.

On the basis of these and other results, the World Health Organization is considering revising its guidelines to recommend immediate provision of antiretroviral therapy to all people infected with HIV, not just to specific groups. The evidence for such a shift could be strengthened at the IAS meeting: the HPTN 052 trial will report whether the dramatic drop in transmission has held up in the longer term, and START will report its full results (the May results were preliminary).

Altogether, the evidence bolsters the case that the world now has the tools at hand to eliminate the HIV threat. As conference co-chair Julio Montaner of the University of British Columbia, Vancouver, argues: “Treatment works for individual and public health, and for the public-health purse. As a policymaker, you have nowhere to hide.”