Members of the Ugandan gay community mourn at the funeral of murdered activist David Kato in 2011. Marc Hofer/AFP/Getty Images

Ugandan lawmakers on Friday passed an anti-gay law that toughens the punishment for homosexuality, which will see repeat offenders jailed for life. The bill also makes it illegal to not report gay people and criminalizes the public promotion of homosexuality — including discussions by rights groups.

The bill drew wide condemnation when it was first introduced in 2009, with U.S. President Barack Obama calling it "odious." The original proposal included the death penalty, but that was removed from the revised version passed by parliament.

David Bahati, the lawmaker behind the bill, told the French news agency Agence France-Presse, "This is a victory for Uganda. I am glad the parliament has voted against evil.

"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."

Bahati argued that the law was needed to deter Western homosexuals whom he accused of "recruiting" Ugandan children. He said homosexuals from the West threatened to destroy Ugandan families and were luring Ugandan children into gay lifestyles.

Ugandan gays disputed this account, 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. Ugandan gays singled out Scott Lively, a Massachusetts evangelical, and sued him in March 2012 under the Alien Tort Statute, which allows noncitizens to file suit in the U.S. if there is an alleged violation of international law.