(This April 13 story has been corrected to remove reference to criminalising identifying as LGBTQ, a provision dropped in the draft stage, in paragraph 3)
KAMPALA (Reuters) - When Frank Mugisha came out two decades ago, being gay in Uganda could be lonely and uncomfortable, but it was rarely a matter of life and death.
Since then, as Mugisha has emerged as the country's most prominent LGBTQ rights activist, the perils have multiplied. In 2011, his friend and colleague David Kato was bludgeoned to death. Mugisha regularly receives death threats.
Politicians and religious organisations have fanned anti-gay sentiment and lobbied for harsh laws, culminating in parliament's passage last month of one of the strictest pieces of anti-LGBTQ legislation anywhere in the world.
"The Ugandan population has been radicalised to fear and hate homosexuals," Mugisha, 38, told Reuters during an interview outside the capital, Kampala.
"If I was seven, nine, twelve, fourteen, I don't think I would tell anyone I am gay right now," he said.
And yet, Mugisha says he will not give an inch in the face of the new bill, which is awaiting President Yoweri Museveni's signature.
The bill passed with near unanimous support in parliament. If Museveni signs it - as he is widely expected to - Mugisha's work could land him in jail under a provision that punishes the "promotion" of homosexuality with up to 20 years in prison.
But Mugisha said he feels an obligation to fight back on behalf of LGBTQ Ugandans, many of whom have left the country or fled their homes for safe houses since the bill was passed.
"I guess I am going to be in trouble a lot because I am not going to stop," Mugisha said.
The bill also imposes the death penalty for so-called aggravated homosexuality, which includes having gay sex while HIV-positive.
COMING OUT
A practising Catholic typically seen in a blue suit and white shirt, Mugisha had what he calls a normal childhood, going to school and playing soccer in his Kampala neighbourhood.
He realised he was gay as early as the age of seven but did not start to come out until he was 14. His parents turned to prayer and traditional healers before landing somewhere between denial and acceptance, he said.
Mugisha said he encountered no overt hostility from friends about his sexuality, although some kept their distance for fear they would be suspected of being gay themselves.
In 2007, Mugisha took over leadership of Sexual Minorities Uganda (SMUG), an advocacy group he had earlier joined as an activist.
In the following years, he saw a hardening of anti-LGBTQ views, which he attributes to campaigning by ultra-conservative Christian groups, some from the United States.
"Homophobia and this whole anti-gay sentiment are Western. They are not Ugandan," he said.
Same-sex relations were first criminalised in Uganda under British colonial rule. Mugisha said historically Ugandans "frowned" upon homosexuality but did not want to harm gay people.
Ugandan officials, by contrast, often say LGBTQ rights are a Western imposition.
Mugisha's friend Kato was killed in 2011 months after a local newspaper printed the names, photographs and addresses of him and others in the LGBTQ community and called for them to be hanged.
The police said the murder was unconnected to his sexual identity, but Mugisha is certain that it was.
He considered leaving Uganda then, but he stayed and led the campaign against a law enacted in 2014 that stiffened penalties for same-sex relations.
That law was ultimately voided by the courts on procedural grounds and Mugisha is hoping for a similar outcome this time.
"Many people are going to ... challenge this law," he said. "Looking at this legislation, I do not think it will survive."
(Editing by Aaron Ross and Nick Macfie)