Gay rights activists say the bill, which has prompted growing international opposition, promotes hatred and could set back efforts to combat HIV/AIDS. They believe the bill is part of a continentwide backlash because Africa's gay community is becoming more vocal.
"It's a question of visibility," said David Cato, who became an activist after he was beaten up four times, arrested twice, fired from his teaching job and outed in the press because he is gay. "When we come out and ask for our rights, they pass laws against us."
The legislation has drawn global attention from activists across the spectrum of views on gay issues. The measure was proposed in Uganda following a visit by leaders of U.S. conservative Christian ministries that promote therapy for gays to become heterosexual. However, at least one of those leaders has denounced the bill, as have some other conservative and liberal Christians in the United States.
Gay rights activists say the legislation is likely to pass. But the bill is still being debated and could undergo changes before a vote, which has not yet been set.
The Ugandan legislation in its current form would mandate a death sentence for active homosexuals living with HIV or in cases of same-sex rape. "Serial offenders" also could face capital punishment, but the legislation does not define the term. Anyone convicted of a homosexual act faces life imprisonment.
Anyone who "aids, abets, counsels or procures another to engage of acts of homosexuality" faces seven years in prison if convicted. Landlords who rent rooms or homes to homosexuals also could get seven years and anyone with "religious, political, economic or social authority" who fails to report anyone violating the act faces three years.
Gay rights activists abroad are focusing on the legislation. A protest against the bill is planned for Thursday in London; protests were held last month in New York and Washington.
David Bahati, the legislator sponsoring the bill, said he was encouraging "constructive criticism" to improve the law, but insisted strict measures were necessary to stop homosexuals from "recruiting" schoolchildren.
"The youths in secondary schools copy everything from the Western world and America," said high school teacher David Kisambira. "A good number of students have been converted into gays. We hear there are groups of people given money by some gay organizations in developed countries to recruit youth into gay activities."
Uganda's ethics minister, James Nsaba Buturo, said the death sentence clause would probably be reviewed but maintained the law was necessary to counter foreign influence. He said homosexuality "is not natural in Uganda," a view echoed by some Ugandans.
"I feel that the bill is good and necessary, but I don't think gays should be killed. They should be imprisoned for about a year and warned never to do it again. The family is in danger in Uganda because the rate at which vice is spreading is appalling," said shopkeeper John Muwanguzi.
Uganda is not the only country considering anti-gay laws. Nigeria, where homosexuality is already punishable by imprisonment or death, is considering strengthening penalties for activities deemed to promote it. Burundi just banned same-sex relationships and Rwanda is considering it.
Homophobia is rife even in more tolerant African countries.
In Kenya, homosexuality is illegal but the government has acknowledged its existence by launching sexual orientation survey to improve health care. Nevertheless, the recent marriage of two Kenyan men in London caused outrage. The men's families in Kenya were harassed by reporters and villagers.
In South Africa, the only African nation to recognize gay marriage, gangs carry out so-called "corrective" rapes on lesbians. A 19-year-old lesbian athlete was gang-raped, tortured and murdered in 2008.
Debate over the Ugandan bill follows a conference in Kampala earlier this year attended by American activists who consider same-gender relationships sinful, and believe gays and lesbians can become heterosexual through prayer and counseling. Author Don Schmierer and "sexual reorientation coach" Caleb Lee Brundidge took part; they did not respond to interview requests.
A third American who took part in the conference in Uganda, Scott Lively, said the bill has gone too far.
"I agree with the general goal but this law is far too harsh," said Lively, a California-based preacher and author of "The Pink Swastika" and other books that advise parents how to "recruit-proof" their children from gays.
"Society should actively discourage all sex outside of marriage and that includes homosexuality ... The family is under threat," he said. Gay people "should not be parading around the streets," he added.
Frank Mugisha, a gay Ugandan human rights activist, said the bill was so poorly worded that someone could be imprisoned for giving a hug.
"This bill is promoting hatred," he said. "We're turning Uganda into a police state. It will drive people to suicide."
Buturo played down the influence of foreign evangelicals, saying the proposed legislation was an expression of popular outrage against "repugnant" practices. But activists like Cato argue anti-gay attitudes are a foreign import.
"In the beginning, when the missionaries brought religion, they said they were bringing love," he said. "Instead they brought hate, through homophobia."
Susan Timberlake, a senior adviser on human rights and law from UNAIDS, said such laws could hinder the fight against HIV/AIDS by driving people further underground. And activists also worry that the legislation could be used to blackmail or silence government critics.
Cato said he thinks the Ugandan bill will pass, perhaps in an altered form.
"It's such a setback. But I hope we can overcome it," he said. "I cannot believe this is happening in the 21st century."