The 21st International Aids Conference was in Durban last week. The last time it was held here, 16 years ago, Aids denialism in South Africa was rife, people were dying on the front lawns of hospitals, unable to access treatment, and President Thabo Mbeki had announced that Aids was caused not by a virus, but by poverty and poor nourishment.

A lot of progress has been made since then. Of the 37 million people living with HIV today, 17 million are on life-saving antiretroviral therapy. South Africa has the largest drug treatment programme in the world. Meanwhile, the number of people infected each year has stalled at just over two million, down from 3.1 million in 2000.

Born in the late 1980s, I first learned about Aids when Princess Diana made headlines in 1991 by shaking hands with an Aids patient without wearing gloves. Where we are now would have been unthinkable then. The optimism was contagious as delegates danced at the conference’s ‘No Pants No Problem’ party (that’s pants in the American sense) and spoke about ending the Aids epidemic by 2030.

Away from the main events, though, there was scepticism. People asked how we were going to end the epidemic in 15 years, when annual international funding fell from $8.6 billion to $7.5 billion between 2014 and 2015. US funding dropped by $500 million while funding from Britain, the second largest donor, fell by $135 million. The decline in funding could cause the epidemic to rebound and grow, especially in sub-Saharan Africa, where more than 70 per cent of people with HIV live.

‘What I’m seeing right now has scared me,’ the executive director of UNAIDS, Michel Sidibé, said, ‘if we continue to harbour the flattening and reduction of funding.’ Chris Breyer, the president of the International Aids Society, told me that ‘expanding treatment to the majority of people not on therapy is not going to happen with declining funding.’

There were calls for middle-income countries to take on more responsibility for funding their own responses, but this is easier said that done. Domestic spending made up more than half the total funding in 2015, but external donors are more likely than many domestic governments to fund programmes aimed at ‘key populations’, among whom more than a third of new infections occur: sex workers, injecting drug users, men who have sex with men, transgender people and prisoners.

The Global Fund to Fight Aids, Tuberculosis and Malaria will hold its fifth triennial ‘replenishment conference’ in September. The fund is asking for $13 billion to be spent over three years. The UK is yet to pledge, but the head of the fund, Mark Dybul, told me that, despite Brexit, he expected strong support from the British government.