Uganda's parliament passed an anti-gay bill on Friday that calls for life in prison for those convicted of "aggravated homosexuality".
The wording of the legislation defines the term as sex between same-sex individuals who when either of the partners has HIV, when either partner is a minor, when either partner is disabled, as well as when two consenting adults engage in repeated sexual offenses.
"The law has come as a surprise to us," says Ugandan gay rights activist Frank Mugisha. "It's been a big shock to us. It's a nighmare for me and the entire LGBT community in Uganda."
Mugisha is directly affected by the legislation. It effectively makes him and what he does illegal. He runs Sexual Minorities Uganda, a gay rights organization in Uganda's capital, Kampala.
"This new law would stop all our work in trying to promote human rights for LGBT persons," Mugisha says. "It would create a witch hunt for those perceived to be homosexuals."
But he isn't planning to leave Uganda. "I'm going to stay here and fight this to the end."
And he's optimistic about his chances. "I think we can find a way to stop the legislation because it totally contravenes our own constitution."
Anti-gay legislation in Uganda was first discussed in 2009. In the original bill, those found of "aggravated homosexuality" could have faced the death penalty. But international outrage prompted Ugandan lawmakers to shelve that version, which President Barack Obama called "odious." But Uganda is a deeply conservative country and discussions among Ugandan lawmakers continued.
Homosexuality is already illegal in Uganda under a colonial-era law that criminalizes sexual acts "against the order of nature." But that wasn't enough. Mugisha blames the push for a more draconian anti-gay law on religious zealots.
"It's all because of religion and the religious propaganda that is in the country. It's because of the indoctrination of conservative views from some extreme religious leaders, who have come to Uganda and spread a lot of homophobia and made Ugandans fearful of homosexuality," he says.
When pressed, Mugisha admits he's at risk for being arrested for advocating under the new law, but he's going to continue the fight the bill. Even though Uganda's parliament has passed the bill, it doesn't become law until Ugandan President Yoweri Museveni signs it.
Mugisha says the bill is totally at odds with Ugandan constitutional protections. "It's going to make life extremely difficult for people who are openly gay and those who are in the closet in Uganda," he says. "Myself and my colleagues are going to work very hard to challenge this law under the constitution as being very unconstitutional."