Uganda's parliament on Tuesday passed sweeping anti-gay legislation which proposes tough new penalties for same-sex relationships, following a highly charged and chaotic session.
"The ayes have it," parliamentary speaker Annet Anita Among said after the final vote, adding that the "bill passed in record time."
Legislators amended significant portions of the original draft law, with all but one speaking against the bill.
Homosexuality is already illegal in the conservative East African nation and it was not immediately clear what new penalties had been agreed upon.
MP Fox Odoi-Oywelowo, who spoke against the bill and who belongs to President Yoweri Museveni's National Resistance Movement party, told AFP that under the final version of the legislation, offenders would face life imprisonment or even the death penalty for "aggravated" offences.
"This House will not shy to restrict any right to the extent the House recognises," Among said.
The bill will next go to President Museveni, who can choose to use his veto or sign it into law.
Broad public support
The legislation enjoys broad public support in Uganda and reaction from civil society has been muted following years of erosion of civic space under Museveni's increasingly authoritarian rule.
Nevertheless, the 78-year-old leader has consistently signalled he does not view the issue as a priority and would prefer to maintain good relations with Western donors and investors.
Discussion about the bill in parliament was laced with homophobic rhetoric, with lawmakers conflating child sexual abuse with consensual same-sex activity between adults.
'Living in fear'
In recent months, conspiracy theories accusing shadowy international forces of promoting homosexuality have gained traction on social media in Uganda.
Museveni last week referred to gay people as "these deviants."
"Homosexuals are deviations from normal. Why? Is it by nature or nurture? We need to answer these questions," he told lawmakers.
"We need a medical opinion on that. We shall discuss it thoroughly," he added, in a manoeuvre interpreted by analysts and foreign diplomats as a delaying tactic.
"Museveni has historically taken into account the damage of the bill to Uganda's geopolitics, particularly in terms of relations with the West, and in terms of donor funding," said Kristof Titeca, an expert on East African affairs at the University of Antwerp.
"His suggestion to ask for a medical opinion can be understood in this context: a way to put off what is a deeply contentious political issue," Titeca told AFP.
On Saturday, Uganda's Attorney-General Kiryowa Kiwanuka told the parliamentary committee scrutinising the bill that existing colonial-era laws "adequately provided for an offence".
Frank Mugisha, executive director of Sexual Minorities Uganda, a leading gay rights organisation whose operations were suspended by the authorities last year, told AFP earlier this month that he had already been inundated with calls from LGBTQ people over the new bill.
"Community members are living in fear," he said.
Last week, police said they had arrested six men for "practising homosexuality" in the southern lakeside town of Jinja.
Another six men were arrested on the same charge on Sunday, according to police.
Uganda is notorious for intolerance of homosexuality — which was criminalised under colonial-era laws.
But since independence from Britain in 1962 there has never been a conviction for consensual same-sex activity.
In 2014, Ugandan lawmakers passed a bill that called for life in prison for people caught having gay sex.
The legislation sparked international condemnation, with some Western nations freezing or redirecting millions of dollars of government aid in response, before a court later struck down the law on a technicality.