JOHANNESBURG - Uganda's parliament on Friday passed tough antigay legislation that will punish those found guilty of "aggravated homosexuality" with life in jail.
While same-sex marriage has been enshrined in a growing number of Western countries, human-rights advocates say gay rights are receding in much of Africa.
Homosexual acts have long been illegal in Uganda and many other parts of the continent, where gays and lesbians are at risk of being beaten up, jailed, and even killed. Supporters of Uganda's bill argued that tougher measures were needed to protect family values.
The original legislation introduced by lawmaker David Bahati in 2009 contained a clause providing the death penalty for "aggravated homosexuality." However, this was dropped in the wake of an international outcry. The bill was repeatedly shelved and revived because of the controversy.
Under the bill approved Friday, "aggravated homosexuality" includes sex acts between adults and minors.
Much of the debate about the law focused on allegations by conservative pastors and parliamentarians that homosexual adults from abroad come to Uganda to "recruit" minors.
"Aggravated homosexuality" can also apply in cases where one participant is HIV-positive or disabled, the law says.
The bill also makes it an offense for someone aware of homosexual activity to fail to report it.
A report in June by the London-based human-rights group Amnesty International said homosexuality was outlawed in 38 African countries. Even in South Africa, where equal rights for people of all sexual orientations are enshrined in the constitution, and where same-sex marriage has been on the books for years, at least seven people were killed last year in antigay violence, according to the report.
Lesbians have also been victims of what is bizarrely known in South Africa as "corrective rape," a reference to the assailants' view that raping them may turn them into heterosexuals.
Uganda is a deeply conservative country, where evangelical preachers and tabloid editors have run vehement antigay campaigns in recent years. Newspapers have "outed" gay people, publishing their names and photographs.
On Monday, police arrested a Kampala businessman, Chris Mubiru, after a tabloid newspaper published photographs of him allegedly having sex with boys, according to local media reports.
Photographs of Mubiru being arrested were published in major newspapers. Police called on any members of the public who had been abused by Mubiru to come forward and give evidence.
Bahati celebrated the passage of the new law Friday in a statement on his Facebook page, saying it would protect Ugandan children, marriages, culture, and family values. In comments with the French news agency AFP he said he was glad that parliament voted "against evil."
He also "liked" President Obama on Facebook, even though Obama has described Bahati's bill as "odious."
The legislation must be signed by President Yoweri Museveni within 30 days to become law.
Parliament approved the bill two days after passing anti-pornography legislation that many say will ban women from wearing miniskirts.