Uganda announced on Monday that President Yoweri Museveni had signed into law draconian new measures against homosexuality described as among the world's harshest, prompting condemnation from human rights and LGBTQ groups as well as Western powers.
US President Joe Biden called for the immediate repeal of the measures he slammed as "a tragic violation of universal human rights", and threatened to cut aid and investment in the east African country.
Museveni's office said the Anti-Homosexuality Bill 2023 was among six pieces of legislation the president signed into law on Sunday.
Lawmakers passed a new draft of the legislation earlier this month, vowing to resist what they said was outside interference in their efforts to protect Uganda's values from Western immorality.
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, though Uganda has not carried out capital punishment for several years.
A rights group announced later Monday that it had filed a legal challenge with Uganda's High Court, arguing that the legislation was "blatantly unconstitutional".
"By criminalising what we call consensual same-sex activity among adults, it goes against key provisions of the constitution including rights on equality and non-discrimination," said Adrian Jjuuko, executive director of the Human Rights Awareness and Promotion Forum.
Deeply repressive law
Biden said he had asked his National Security Council to assess what the law means for "all aspects of US engagement with Uganda", including services providing AIDS relief and other assistance and investments.
He said the administration would also consider sanctions against Uganda and the restriction of entry into the United States of people engaging in human rights abuses or corruption there.
EU foreign policy chief Josep Borrell said the Ugandan government had "an obligation to protect all of its citizens and uphold their basic rights".
"Failure to do so will undermine relationships with international partners," he warned in a statement.
Britain, the former colonial power in Uganda which criminalised homosexuality during its rule, said it was "appalled" and called the law "deeply discriminatory".
"It will increase the risk of violence, discrimination and persecution, will set back the fight against HIV/AIDS," Britain's Minister for Development and Africa Andrew Mitchell said.
The UN Human Rights Office, whose commissioner Volker Turk in March described the bill as "among the worst of its kind in the world", also condemned its passage into law.
"It is a recipe for systematic violations of the rights of LGBT people & the wider population," the office said on Twitter.
Ashwanee Budoo-Scholtz, Africa deputy director for Human Rights Watch, told AFP that it was "discriminatory and is a step in the wrong direction for the protection of human rights for all people in Uganda".
Amnesty International also said the signing of this "deeply repressive law is a grave assault on human rights".
But the legislation has broad public support in Uganda, a majority Christian country that has pursued some of the toughest anti-gay legislation in Africa, where around 30 nations ban homosexuality.
"We have stood strong to defend the culture, values and aspirations of our people," parliament speaker Anita Among, one of the bill's main proponents, said in a statement.
Living in fear
Discussion of the bill in parliament was laced with homophobic slurs, and Museveni himself referred to gay people as "deviants".
Frank Mugisha, executive director of Sexual Minorities Uganda, said the law would "bring a lot of harm" to the country's already persecuted LGBTQ community.
"We feel so, so, so worried," he told AFP.
The revised bill said "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".
An earlier version also required Ugandans to report suspected homosexual activity to the police or face six months' imprisonment.
Lawmakers agreed to amend that provision, and instead the reporting requirement pertained only to suspected sexual offences against children and vulnerable people, with the penalty raised to five years in jail.
Anyone who "knowingly promotes homosexuality" faces up to 20 years in jail, while organisations found guilty of encouraging same-sex activity could face a 10-year ban.
Reaction from civil groups in Uganda has been muted following years of authoritarian rule under Museveni.
But the European Parliament voted in April to condemn the bill and asked EU states to pressure Museveni to not implement it, warning that relations with Kampala were at stake.
Asuman Basalirwa, the MP who sponsored the bill, said that aid cuts were expected and that Among, the parliament speaker, had already been informed her US visa had been revoked.
The bill also risked undermining progress in combating HIV/AIDS in Uganda, according to a statement by UNAIDS, the Global Fund to Fight AIDS, Tuberculosis and Malaria, and the US President's Emergency Plan for AIDS Relief (PEPFAR).
There has never been a conviction for consensual same-sex activity since independence from Britain in 1962.