Uganda has voted in favor of a bill that would make "aggravated homosexuality," including repeated gay acts, punishable by life imprisonment, and threaten jail for those who fail to report gay people.
While homosexuality was already illegal in Uganda, MP David Bahati, who was behind the bill, sought to strengthen existing laws.
"This is victory for Uganda. I am glad the parliament has voted against evil," said Bahati, according to AFP news agency. "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."
The bill now heads to President Yoweri Museveni for his signature.
The parliament-approved bill initially sought to impose the death penalty on those caught in gay acts. Several world leaders have objected the harsh punishment, threatening to impose sanctions on the African country.
Supporters of the new bill have argued that their traditional family values have been threatened by Western-inspired gay rights groups, and this new law would be a pushback against such an influence.
According to the CIA Factbook, 41.9 percent of Uganda's population is Roman Catholic, another 42 percent are Protestant, while 12.1 percent are Muslims.
Human rights activists have spoken out against the bill, however, saying that it shows intolerance and discrimination against the gay community in Uganda.
"The introduction of this bill led Uganda to be called the worst place to be gay. As parliament debated it, gay activists met in a suburb of the capital Kampala to work out their own plan. They say their lives are often in threat here because of intolerance," reported BBC News' Catherine Byaruhanga in Uganda.
Enforcement of the law might prove to be a challenge, Byaruhanga pointed out, as authorities will need to gather evidence that someone has engaged in homosexual acts, which might be hard to prove.
Popular religious leaders such as Saddleback Church Pastor Rick Warren have spoken out against the previous death-penalty version of the bill, calling it "unjust, extreme and un-Christian toward homosexuals."
Warren, who has visited and spoken in Uganda a number of times throughout his ministry engaging in anti-AIDS efforts, has said that while it is not his role to interfere with the politics of other countries, he still has a duty to speak out on moral issues.
"An unjust law in Uganda is back in the news. I opposed it three years ago and I still do," Warren said last year in a statement shared with The Christian Post when the Ugandan law was being discussed in parliament again.
The new bill is said to be "highly popular" among Ugandans despite criticism from foreign countries, the Associated Press reported, as it has been seen as a measure to protect children.
"We think this is an achievement for Uganda because the minors will be protected and the innocents will be saved from abuse and molestation," added Simon Lokodo, Uganda's minister of State for Ethics and Integrity.
"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."