Uganda's parliament has passed an anti-gay law that punishes "aggravated homosexuality" with life imprisonment.
The bill drew wide condemnation when it was first introduced in 2010 and initially included the death penalty, but that was removed from the revised version passed by parliament.
The law passed on Friday sets life imprisonment as the penalty for gay sex involving an HIV-infected person, acts with minors and the disabled, as well as repeated sex offenses among consenting adults, according to the office of a spokeswoman for Uganda's parliament.
"Now anybody found practising, recruiting for or publicising homosexuality commits a felony," said Simon Lokodo, Uganda's Minister of State for Ethics and Integrity.
He added that the law provided for punishments of between two years and life behind bars.
"We will get hold of all those encouraging others to become homosexuals or lesbians. Anybody we find recruiting or using materials to promote homosexuality, we will arrest."
For the bill to be enacted it must be signed by President Yoweri Museveni. There is currently some speculation as to whether he will sign the bill, which was first introduced to parliament in 2009, in to law.
'Fear and persecution'
The passage of the bill makes it "a truly terrifying day for human rights in Uganda," said Frank Mugisha, a prominent Ugandan gay activist, who called the legislation "the worst in the world".
If this law is signed by President Museveni, I'd be thrown in jail for life and in all likelihood killed.
He urged the country's president not to sign it into law.
"It will open a new era of fear and persecution," he said. "If this law is signed by President Museveni, I'd be thrown in jail for life and in all likelihood killed."
Homosexuality was already illegal in Uganda under a colonial-era law that criminalised sexual acts "against the order of nature."
The Ugandan politician who introduced the bill to parliament argued that tough new legislation was needed because homosexuals from the West threaten to destroy Ugandan families by allegedly "recruiting" Ugandan children into gay lifestyles.
Ugandan gays denied this claim, saying that Ugandan political and religious leaders had come under the influence of American evangelicals who wanted to spread their anti-gay campaign in Africa.
In March 2012 Ugandan homosexuals sued Scott Lively, a Massachusetts evangelical, under the Alien Tort Statute that allows non-citizens to file suit in the US if there is an alleged violation of international law.
Lively denied he wanted severe punishment for gays, and has previously told The Associated Press news agency he never advocated violence against gays but advised therapy for them.
In 2012 Ugandan gays held their first gay pride parade and have previously joined street marches in support of all human rights.
Despite criticism of the bill abroad, it was highly popular among Ugandans who said the country had the right to pass laws that protect its children.
The bill was repeatedly shelved despite the protests of Ugandan politicians.
Homophobia is widespread in Uganda. Gay men and women in the country face frequent harassment and threats of violence, and rights activists have also reported cases of lesbians being subjected to "corrective" rapes.
In 2011, prominent Ugandan gay rights activist David Kato was bludgeoned to death at his home after a newspaper splashed photos, names and addresses of gays in Uganda on the front page along with a yellow banner reading "Hang Them".