The Ugandan Parliament in session.
Uganda's parliament on Friday passed an anti-homosexuality bill that would see repeat offenders jailed for life, reports and activists said.
"I am officially illegal," Ugandan gay activist Frank Mugisha said after the vote.
The lawmaker behind the bill, David Bahati, said an extremely controversial death penalty clause was dropped from the final version of the bill, which must now go to President Yoweri Museveni for approval.
First proposed in 2009, the bill had been shelved following international condemnation.
US President Barack Obama described its contents as "odious".
The initial proposed bill suggested introducing 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.
Homosexuality is already illegal in Uganda, but the new bill toughens penalties and also criminalises the public promotion of homosexuality - including discussions by rights groups.