Uganda's president has signed into law anti-gay legislation supported by many in this East African country but widely condemned by rights activists and others abroad.
The version of the bill signed by President Yoweri Museveni doesn't criminalise those who identify as LGBTQ, a key concern for some rights campaigners who condemned an earlier draft of the legislation as an egregious attack on human rights.
A suspect convicted of "attempted aggravated homosexuality" can be imprisoned for up to 14 years, according to the legislation.
Parliamentary Speaker Anita Among said in a statement that the president had "answered the cries of our people" in signing the bill.
"With a lot of humility, I thank my colleagues the Members of Parliament for withstanding all the pressure from bullies and doomsday conspiracy theorists in the interest of our country," the statement said.
Museveni had returned the bill to the national assembly in April, asking for changes that would differentiate between identifying as LGBTQ and actually engaging in homosexual acts.
That angered some lawmakers, including some who feared the president would proceed to veto the bill amid international pressure.
Lawmakers passed an amended version of the bill earlier in May.
LGBTQ rights campaigners say the new legislation is unnecessary in a country where homosexuality has long been illegal under a colonial-era law criminalising sexual activity "against the order of nature."
The punishment for that offence is life imprisonment.
The US had warned of economic consequences over legislation described by Amnesty International as "draconian and overly broad."
In a statement from the White House today, US President Joe Biden called the new law "a tragic violation of universal human rights — one that is not worthy of the Ugandan people, and one that jeopardises the prospects of critical economic growth for the entire country."
"I join with people around the world — including many in Uganda — in calling for its immediate repeal. No one should have to live in constant fear for their life or being subjected to violence and discrimination. It is wrong," Biden said.
The UN Human Rights Office said it was "appalled that the draconian and discriminatory anti-gay bill is now law," describing the legislation as "a recipe for systematic violations of the rights" of LGBTQ people and others.
Rights activists have the option of appealing the legislation before the courts.
One group of activists and academics petitioned the constitutional court seeking an injunction against enforcement of the law.
An anti-gay bill enacted in 2014 was later nullified by a panel of judges who cited a lack of quorum in the plenary session that had passed that particular bill.
Any legal challenge this time is likely to be heard on the merits, rather than on technical questions.
Anti-gay sentiment in Uganda has grown in recent weeks amid news coverage alleging sodomy in boarding schools, including a prestigious school for boys where a parent accused a teacher of abusing her son.
The February decision of the Church of England 's national assembly to continue banning church weddings for same-sex couples while allowing priests to bless same-sex marriages and civil partnerships outraged many in Uganda and elsewhere in Africa.
Homosexuality is criminalised in more than 30 of Africa's 54 countries.
Some Africans see it as behaviour imported from abroad and not a sexual orientation.
Talk show giant shrugged off celebrity stalker
Sign up here to receive our daily newsletters and breaking news alerts, sent straight to your inbox.