Uganda's parliament on Friday adopted an anti-homosexuality bill that will see repeat offenders jailed for life, with lawmakers hailing it as a victory against "evil" for the deeply religious nation.
Deputies voted overwhelmingly in favour of the text, which has been widely condemned by rights activists and world leaders -- with US President Barack Obama describing it as "odious" and Nobel Peace laureate archbishop Desmond Tutu comparing it to apartheid.
The lawmaker behind the bill, David Bahati, said a death penalty clause was dropped from the final version of the bill. The approved text must now be given the green light by President Yoweri Museveni, himself a devout evangelical Christian.
"This is a victory for Uganda. I am glad the parliament has voted against evil," Bahati told AFP.
"Because we are a God-fearing nation, we value life in a holistic way. It is because of those values that members of parliament passed this bill regardless of what the outside world thinks," he said.
First proposed in 2009, the bill had been shelved following international condemnation, but parliamentary spokeswoman Hellen Kaweesa said the changes meant that it had secured "majority support" among MPs.
"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.
An early version of the bill would have introduced the death sentence for anyone caught engaging in homosexual acts for a second time, as well as for gay sex where one partner is a minor or has HIV.
"We think this is an achievement for Uganda because the minors will be protected and the innocents will saved from abuse and molestation," Lokodo said.
"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."
Homophobia is widespread in Uganda, where American-style evangelical Christianity is on the rise. 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".
While homosexuality was already illegal, the new bill stiffens penalties and also criminalises the public promotion of homosexuality -- including discussions by rights groups.
After the vote, Ugandan gay activist Frank Mugisha declared himself "officially illegal" and also "outraged and disappointed".
"This is a truly terrifying day for human rights in Uganda," he said. "It will open a new era of fear and persecution. If this law is signed by President Museveni, I'd be thrown in jail for life and in all likelihood killed. We urgently need world leaders to call on President Museveni and demand he stops this bill of hate from becoming law."
Leslie Lefkow of Human Rights Watch said the law was "abhorrent".
One Ugandan MP, Fox Odoi, was also critical.
"Fundamentally there is the human rights issue. It's a bad law and it doesn't serve any useful purpose," he said.
"If a man has sex with a woman and penetrates her anus, there's supposed to be nothing wrong with that. How can you apply two different standards to what is much the same thing? I can't quite understand that."
The vote also comes a day after the Ugandan parliament passed an anti-pornography and dress-code law that bans anything that is deemed sexually suggestive.
"Anybody that dresses in very very short skirt or a very opened shirt that allows people to see the breast, anybody that dresses in a way that we can see the buttocks, is condemned by this law," Lokodo said.
It also outlaws "any erotic behaviour intended to cause sexual excitement or any indecent act or behaviour tending to corrupt morals".
In 2008, former ethics and integrity minister James Nsaba Buturo tried to pass similar legislation claiming a woman wearing provocative clothing risked causing traffic accidents by distracting drivers.
President Museveni caused an uproar in 2012 when he told female school students to "keep a padlock on your private parts until the time comes to open them when you have a husband".
In addition to outlawing "provocative" clothing, the anti-pornography bill will result in scantily dressed performers being banned from Ugandan television. It will also closely monitor what individuals watch on the Internet.