Elton John has pledged to spend his Aids Foundation’s money on supporting lesbian, gay, bisexual and transgender people in Africa who are stigmatised and penalised in their own countries.

The singer has joined Pepfar, the US president’s emergency plan for Aids relief, in a $10m LGBT fund that will issue grants and provide expertise to help those living under homophobic regimes.

John acknowledged that he could not persuade governments to change their values. “I know that certain governments in Africa will not respond to someone like me telling them you should do this, you should do that. I count for nothing as far as that goes.

“What I can do is ensure that people who are LGBT – if their clinics are closed down because they are LGBT – we can give them medicine. If they are arrested, we will get them legal aid,” he said on Wednesday at the international Aids conference in Durban, South Africa.

Many sub-Saharan African countries have anti-homosexuality laws and in some, including Nigeria and Sudan, there is the threat of the death penalty. There is a long history of violent attacks and persecution against LGBT people.

“We will help them on the ground,” said John. “With these countries sometimes, who knows, it might take 50 years, but I guarantee it will change.” He compared Africans who were prepared to be open about their sexuality with the campaigners from gay rights organisations Stonewall and Act Up in the 1960s and 80s.

“You might have to fight for your own life but it will be worth it because in the end, you will win,” he said. “In the 60s in England you were prosecuted for being homosexual. Most people who could afford it went to north Africa to have sex or were arrested in public toilets. Now I can be married to my partner. Things can change.”

They already have in South Africa, he said. That morning he had visited LGBT people at the Anova clinic in Durban, with the South African health minister, Aaron Motsoaledi. “This was an amazing experience for me because many years back I came to Durban with [John’s partner] David [Furness] and I met with some white members of the LGBT community in a room above a cafe or restaurant. None of those people wanted to have their photographs taken because they didn’t want to be seen in the newspapers, because if they were seen in a photograph with me and they were known to be gay they would be subject to attack,” he said.

LGBT people, like sex workers and drug users, must be included in the fight against Aids, he said. “If you don’t, this campaign against Aids will be a disaster, All the groundwork, all the wonderful scientific work, all the hard work on the ground from countless people all over the world will come to nothing because if we leave these people behind the disease will spread further and further and further.”