Uganda passed a bill on Wednesday that made some homosexual acts punishable by death - a law the White House in the United States has labelled as "extreme".
Only two of the 389 members of the Ugandan parliament abstained from the vote passing the anti-homosexuality bill, which outlined life imprisonment sentences for gay sex and "recruitment, promotion and funding" of same-sex activities.
"A person who commits the offence of aggravated homosexuality and is liable, on conviction, to suffer death," reads the bill by Robina Rwakoojo who is the country's chairperson for legal and parliamentary affairs.
The BBC reported that "aggravated homosexuality" is supposed to be sexual abuse of a child, a person with disability or vulnerable people, or in cases where a victim of homosexual assault is infected with a life-long illness.
White House spokesperson Karine Jean-Pierre said on Wednesday that the bill was the most extreme law against homosexuality across the globe.
One of the MPs that abstained from the vote, Fox Odoi-Oywelowo, said the bill is ill-conceived.
"It contains provisions that are unconstitutional, reverses the gains registered in the fight against gender-based violence and criminalises individuals instead of conduct that contravenes all known legal norms," Odoi-Oywelowo told The Guardian.
The bill will now go to President Yoweri Museveni, who can decide for or against signing it into law.
However, a recent speech by the president showed he was leaning towards signing the bill having called gay people "deviants".
"The western countries should stop wasting the time of humanity by trying to impose their practices on other people," said Museveni in a televised address to parliament on 16 March.
Out of 54 African states, only 22 have legalised homosexuality.
Ugandan gay rights activist Eric Ndawula tweeted: "Today's events in parliament are not just immoral, but a complete assault on humanity. It's frightening that our MPs' judgement is clouded by hate and homophobia. Who benefits from this draconian law?"
Another rights activist told the BBC the debate around the bill had led to fear of more attacks on gay people.
"There is a lot of blackmail. People are receiving calls that 'if you don't give me money, I will report that you are gay,"' they said.
Compiled by Dylan Bettencourt