Kampala, Uganda - A little more than a week after the Ugandan parliament passed a bill outlawing homosexuality, Frank Mugisha - a leader of Uganda's gay rights movement - turned up at a posh hotel in Kampala, the capital, to attend a gala for Ugandans working abroad.

His decision to attend was a bold move: Homophobia runs deep in Uganda, and the anti-homosexuality bill will see gay men like Mugisha jailed for up to 14 years if found guilty of engaging in consensual homosexual acts. Those convicted of "aggravated homosexuality" - which is defined to include acts committed with children, by HIV-positive individuals, or by authority figures - would be jailed for life.

At a cocktail party before the dinner at the Serena Hotel, Mugisha stood chatting and sipping drinks with two other gay Ugandans, apparently afraid to mingle with other people. Few guests dared join the trio in conversation.

"Serena [Hotel] is one of the places where you are very sure that however much a Ugandan hates you, they are less likely to come and attack you or else they will be embarrassed," said Mugisha, a diminutive man who wears glasses and won the 2011 Robert F Kennedy Human Rights Award. But, he added, "if someone was bold enough and said, 'you know what: I do not want these people'", things could go horribly wrong.

The 32-year-old said he has been attacked in a supermarket while shopping, and on another occasion had his car tyre slashed.

Many Ugandans have hailed the bill, saying it will help fight what they say is a "vice" imposed on them by Western leaders who have warned that financial aid to Uganda will be cut if the bill, which US President Barack Obama has called "odious", becomes law.

International condemnation



Tabled in 2009 and amended to remove a clause that would have imposed the death sentence for aggravated homosexuality, the bill has attracted widespread condemnation from Western countries. When it was passed last month, one of Britain's leading businessmen, billionaire Richard Branson, called on companies and tourists to boycott Uganda, sparking a firestorm of criticism by Ugandans on social media.

Our faith is of no use if it does not come into the public square, where laws are made, where activities for government and regulation of [personal] conduct is done. - Pastor Martin Ssempa

"I have been trying to not be disappointed in you, for I have bought and read three of your books and admire your 'screw it, let's do it' approach to business. But, dude, I am not going to watch you screw us on this one," wrote top Ugandan comedian Richard Tuwangye on his Facebook page.

Few things in Uganda stir up as much emotion as the debate about homosexuality. In 2012, a prominent evangelical pastor burst into the studio of a TV station in Kampala when a transgender activist was being interviewed and interrupted the show. Pastor Martin Ssempa told the TV talk show host that the activist, named Pepe Julian Onziema and a winner of the Clinton Global Citizens Award for his gay rights-related work in Uganda, was a sham and was promoting immorality to win fame and make money.

Onziema, who also attended the gala dinner at Serena, was forced to walk out of the studio in protest as the pastor continued to rail against him.

"I am a pastor but like Dr Martin Luther King, who fought racism in America, our faith is of no use if it does not come into the public square, where laws are made, where activities for government and regulation of [personal] conduct is done," Ssempa told Al Jazeera. Saying homosexuality is "repugnant to our [African] culture", the pastor cited a survey by Steadman and Associates that he said found more than 99 per cent of Ugandans are "solidly opposed to sodomy and its acceptance anywhere".

The bill, though it has not yet been become law, has caused a surge in the popularity for politicians like David Bahati, the MP who drafted it, and the speaker of Uganda's parliament, Rebecca Kadaga.

In October 2012, while attending a conference for parliamentarians in Quebec, Kadaga laid into Canada's foreign minister for criticising Uganda's treatment of homosexuals and enacting draconian laws, winning kudos from Ugandans who insist gay people have invaded single-sex schools where they allegedly lure students with cash so they can engage in homosexuality. Kadaga, who is rumoured to be eyeing the presidency, has since been called a heroine and a saviour of Ugandan morals.

Yet the bill was passed despite objections from Prime Minister Amama Mbabazi, who said the government was still carrying out consultations. More importantly, the number of MPs present at the time of the vote was below the minimum level required by law.

'Thinking before acting'



There is still some hope for gay Ugandans. President Yoweri Museveni - who may fear the withdrawal of foreign aid if the bill is not amended - could still put pressure on the MPs to remove harsh clauses.

As religious leaders called on him last week to sign the bill, Museveni said a caucus of his ruling National Resistance Movement would review it again. "I like thinking before acting. This is not a simple matter, which I can just rush into. If the MPs bring the bill to me, I will first analyse it … and see how to handle it," the state-owned New Vision newspaper quoted him as saying.

Pressure from donor countries seems to have been working, as Museveni's stance on homosexuality has softened over the years. In the late 1990s, when a group of gay Ugandans said they would stage a protest, he issued a stern warning, hinting that their protest would be disrupted with brute force.

In interviews with international news organisations, he has since called for laws preventing gay people from engaging in public displays of affection and measures punishing paedophiles.

Whatever the president says might be seen as a good will, but we do not think he necessarily cares about us. We are going to use all means necessary to ensure that this law is not implemented. - Phiona Labu, gay activist

Defenders of gay rights in Uganda have said paedophilia, not homosexuality, is the real problem and that that those behind the bill have failed to make the distinction. "In our statements, we emphasise that only criminalise us if we rape, if we molest children. People fail to understand that there is paedophilia and homosexuality," Phiona Labu, a lesbian whose real name has been changed to protect her, told Al Jazeera.

Labu works for the Civil Society Coalition on Human Rights and Constitutional Law in Kampala and said she has also faced persecution and harassment. The house she was renting was broken into recently while she was away and the assailants took her computer, she said. "We are definitely going to work as hard as possible to ensure that this bill goes away once and for all … Whatever the president says might be seen as a good will, but we do not think he necessarily cares about us. We are going to use all means necessary to ensure that this law is not implemented."

Ugandans who sympathise with gay people find the alacrity with which homosexuality is being fought surprising. Those behind the campaign against consensual same-sex relationships claim they are protecting the country's moral fibre. But morality is not as frequently discussed when it comes to issues such as corruption and abuse of office, which are widespread - for instance, the president once allowed his pregnant daughter to fly to Germany in his official jet in order to give birth.

But the authorities have acted swiftly where homosexual conduct is concerned. Just a week after the bill was passed, a school in eastern Uganda expelled 22 female students over what it said was lesbianism.

King Mwanga's harem



The widespread view that homosexuality is alien to African culture persists in Uganda, although the evidence contradicts it.

When reminded that Uganda's King Mwanga II, who ruled from 1884 to 1897 and, like Ssempa, hailed from the Baganda tribe, had a male harem, Ssempa responded: "As you know, he wanted to sodomise some of the young men who refused him and he killed them. And as a result of that, the nation of Uganda stops everything on June 3rd [called Martyrs' Day in Uganda] to mourn collectively the occurrence of such a barbaric act.

"The occurrence of this issue is known as a vice. It is condemned; it is punished in various measures. So we do not deny that it may have existed here and there. What we totally deny is the fact that it is not a vice and, I think, the question here is that Europeans call this a right and Africans call it a vice."