Ugandan President Yoweri Museveni on Monday signed into law a controversial anti-gay bill, his office and the country's parliament said, introducing draconian measures against homosexuality that have been described as among the world's harshest.
Museveni "has assented to the Anti-Homosexuality Bill 2023. It now becomes the Anti-Homosexuality Act 2023," a statement posted on the presidency's official Twitter account said.
Uganda's parliament on Twitter said Museveni had approved a new draft of the legislation that had been passed overwhelmingly this month by lawmakers, who defended the measures as a protection of national culture and values.
The president had called on MPs to rework the bill, although most of the hardline provisions that caused an outcry in the West and warnings of diplomatic repercussions were retained.
The amended version said that identifying as gay would not be criminalised but "engaging in acts of homosexuality" would be an offence punishable with life imprisonment.
Although Museveni had advised lawmakers to delete a provision making "aggravated homosexuality" a capital offence, lawmakers rejected that move, meaning that repeat offenders could be sentenced to death.
Uganda has not resorted to capital punishment for many years.
The United States, European Union and international human rights groups have all condemned the bill, and UN High Commissioner for Human Rights Volker Turk has described it as "probably among the worst of its kind in the world."
But it enjoys broad public support in Uganda, a devout majority-Christian nation, where homosexuals have faced persistent discrimination in recent years, and same-sex relationships have been attacked as an import from the West.
Discussion of the bill in parliament was laced with homophobic slurs, and Museveni himself referred to gay people as "deviants."
"As Parliament of Uganda, we have heeded the concerns our people and legislated to protect the sanctity of family," said one of the bill's strongest proponents and Uganda's speaker of parliament, Anita Among, in a statement.
"We have stood strong to defend the Culture, Values and aspirations of our people."
The revamped bill says that "a person who is believed or alleged or suspected of being a homosexual, who has not committed a sexual act with another person of the same sex, does not commit the offence of homosexuality".
The earlier version also required Ugandans to report suspected homosexual activity to the police or face six months' imprisonment.
Lawmakers agreed to amend that provision after Museveni said it risked creating "conflicts in society."
Instead, the reporting requirement pertained only to suspected sexual offences against children and vulnerable people, with the penalty raised to five years in jail.
According to the new draft, anyone who "knowingly promotes homosexuality" faces up to 20 years in jail - a provision left unchanged from the original bill.
Organisations found guilty of encouraging same-sex activity could face a 10-year ban.
Reaction from civil society in Uganda has been muted following years of erosion of civic space under Museveni's increasingly authoritarian rule.
But internationally, the law provoked outrage.
The European Parliament voted in April to condemn the bill and asked EU states to pressure Museveni into not implementing it, warning that relations with Kampala were at stake.
The White House has also warned the Ugandan government of possible economic repercussions if the legislation takes effect.
Homosexuality was criminalised in Uganda under colonial laws, but there has never been a conviction for consensual same-sex activity since independence from Britain in 1962.