From the BBC website, December 20, 2013
Uganda's parliament has passed a bill to toughen the punishment for homosexual acts to include life imprisonment in some cases.
The anti-homosexuality bill also makes it a crime punishable by a prison sentence not to report gay people.
The prime minister opposed the vote, saying not enough MPs were present.
The bill has been condemned by world leaders since it was mooted in 2009 - US President Barack Obama called it "odious".
I am glad the parliament has voted against evil”
End Quote David Bahati MP
The BBC's Catherine Byaruhanga in Kampala says the government knows there will be an international outcry, which could see some countries suspend aid to the country.
She says that Prime Minister Amama Mbabazi might follow up on his complaints about a lack of quorum, while it remains to be seen whether President Yoweri Museveni will sign the bill into law.
The private member's bill originally proposed the death penalty for some offences, such as if a minor was involved or the perpetrator was HIV-positive, but this has been replaced with life in prison.
The MP behind the bill, David Bahati, told the AFP news agency: "This is 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," he said.
The bill also bans the promotion of homosexuality.
"I am officially illegal," Ugandan gay activist Frank Mugisha said after the vote.
The bill's supporters say it is needed to protect traditional family values, which they say are under attack from Western-inspired gay rights groups.
Its critics say the bill has been pushed by some US evangelical Christians.
Uganda is a socially conservative country and on Thursday passed an Anti-Pornography Bill, which bans miniskirts and sexually suggestive material such as some music videos.
Human rights activists say the bill highlights the intolerance and discrimination the gay community faces in Uganda.
One gay activist was killed in 2011, although the police denied he was targeted because of his sexuality.
Meanwhile a local newspaper has been condemned for publishing the names and addresses of people it said were gay.
AnalysisThe 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.
First tabled in parliament back in 2009, the proposed law caused such an international backlash that it has languished in parliamentary bureaucracy up until now. It originally proposed a death sentence for certain homosexual acts but this was scrapped and punishment limited to life imprisonment.
Speaker Rebecca Kadaga has been instrumental in giving the bill a new lease of life. Last year she promised it as a "Christmas gift" to the country.
The challenge is enforcement. Authorities need to be able to gather evidence that shows someone has engaged in homosexuality. This is hard to prove and one of the reasons Uganda's current anti-gay legislation has been rarely enforced.
But once enacted the bill might give law enforcers extra motivation to tackle "homosexual crimes". This could lead to more arrests and intrusive medical exams.