What you need to know:
- In 2013, Ugandan lawmakers passed a bill that called for life in prison for people caught having gay sex, although a court later struck down the law.
- The following year in a BBC interview conducted by British comedian and gay rights activist Stephen Fry, Ethics Minister Lokodo said heterosexual rape was more "natural" than homosexual sex and threatened to arrest Fry.
The controversial Nyege Nyege festival has been reinstated on Wednesday following a public outcry after Ethics and Integrity Minister, Fr Simon Lokodo banned it as an orgy of homosexuality, nudity and drugs akin to "devil worship".
Fr Lokodo, a fervent Christian and prominent homophobe, on Tuesday declared the cancellation of the popular Nyege Nyege music festival.
The annual four-day party on the edge of the Nile in the southern town of Jinja brings together artists from across Africa to entertain around 10,000 revellers and has been held for the last three years.
However, Lokodo slammed the event as being used for, "the celebration and recruitment of young people into homosexuality".
"There will be nudity and sexuality done at any time of the hour. There will be open sex," Lokodo said via a government Twitter account.
"The very name of the festival is provocative. It means 'sex, sex' or urge for sex," he added.
In the local Luganda language "nyege nyege" in fact means an irresistible urge to dance, however in other languages in the region it can have a sexual connotation.
"Let foreigners not come to Uganda for sex. We shall save the image of this country," said Lokodo, who said the festival was "close to devil worshipping".
The decision shocked organisers just days before the event which is to start on Thursday and last until Sunday, with Ugandans decrying the move on social media.
"Beatings, killing, kidnaps, unnecessary endless taxing, etc. Somehow that is all acceptable and (the festival) isn't?" wrote one Twitter user.
However, after a government meeting on Wednesday, Internal Affairs Minister, Gen Jeje Odongo, overruled his colleague and ordered the party back on, however under conditions which he did not detail.
"We are meeting all stakeholders but we have agreed that the festival will go on as planned," he said.
"The organisers have to meet certain conditions and the details will be availed later."
Relief to many
The return of the festival was welcomed by many involved.
South African artist Sho Madjozi, already in the country for the event, said the cancellation had been "heartbreaking" but it was "good to hear it is on".
"Hotels and local tourism were going to be affected by the cancellation. It is a relief to many that the festival is on," said Jinja's mayor Majid Mutambuze.
The festival drama comes after the arrest of popular singer-turned-MP Bobi Wine who has detailed his alleged torture at the hands of police. He and 33 others have been charged with treason for allegedly stoning President Yoweri Museveni's car.
Ugandans have also been battling a new tax on the use of social media.
Protests linked to both issues have been brutally suppressed by police.
Uganda is notorious for its intolerance of homosexuality - which is criminalised in the country - and strict Christian views on sexuality in general.
In 2013, Ugandan lawmakers passed a bill that called for life in prison for people caught having gay sex, although a court later struck down the law.
The following year in a BBC interview conducted by British comedian and gay rights activist Stephen Fry, Ethics Minister Lokodo said heterosexual rape was more "natural" than homosexual sex and threatened to arrest Fry.