The late-November afternoon sun bore down on the park in downtown Kampala, and all along the benches, Ugandan office workers took their siestas. There could have been no less likely setting for criminal conspiracies to topple an East African state. Still, the doctor's voice dropped a notch when an office worker in a brown suit settled in close by. The medic shifted a battered fedora over his eyes. "I am the gay doctor," the physician whispered to me, making sure nobody around heard. He talked about the gay and lesbian couples who go to his office to avoid ridicule in public hospitals. "They know they can trust me, and trust is a big issue," he said. "There is the stigma of being gay, but also the stigma of being [HIV] positive. They are such hidden communities. Nobody wants to deal with their problems."

In a matter of weeks, the Ugandan doctor's admission to TIME could land him in jail and his patients on death row. An anti-homosexuality bill now before Uganda's Parliament would include some of the harshest anti-gay regulations in the world. If the bill becomes law, the doctor, who asked that his name not be published, could be prosecuted for "aiding and abetting homosexuality." In one version of the bill, his sexually active HIV-positive patients could be found guilty of practicing acts of "aggravated homosexuality," a capital crime, according to the bill. (See the struggle for gay rights in the U.S.)

Thanks to a clause in the would-be law that punishes "failure to disclose the offense," anybody who heard the doctor's conversation could be locked up for failing to turn him in to the police. Even a reporter scribbling the doctor's words could be found to have "promoted homosexuality," an act punishable by five to seven years in prison. And were any of the Ugandans in the park to sleep with someone of the same sex in another country, the law would mandate their extradition to Uganda for prosecution. Only terrorists and traitors are currently subject to extraterritorial jurisdiction under Ugandan law. Even murderers don't face that kind of judicial reach.

(Update: Reports out of Kampala late Wednesday indicated that the death penalty may be dropped from the final version of the bill, which may come to a vote as early as two weeks from now.)

"You may think that this bill targets only homosexual individuals," said Sylvia Tamale, dean of law at Uganda's Makerere University, speaking at a public dialogue on the bill in November. "If passed into law, it will stifle the space of civil society. The bill also undermines the role of the media to report freely. We are all potential victims of this bill."(See "On Scene: With Uganda's Anti-Gay Movement.")

The bill has an American genesis of sorts, inspired to a large extent by the visits of U.S. evangelicals who are involved with a movement that promotes Christianity's role in getting homosexuals to become "ex-gays" through prayer and faith. Ugandan supporters of the bill appear to be particularly impressed by the ideas of Scott Lively, a California conservative preacher who has written a book, The Pink Swastika, about what he calls the links between Nazism and a gay agenda for world domination, which, by itself, would have raised the anti-colonial sensitivities of Ugandan society. Says the Rev. Kapya Kaoma, an Episcopalian priest from Zambia who authored a recent report on anti-gay politics in Uganda, Nigeria and Kenya: "The U.S. culture wars have been exported to Africa."

One of the bill's loudest supporters is a charismatic pastor, Martin Ssempa, who heads a Ugandan campus AIDS eradication organization that is funded in part by the U.S. and who was associated with the global outreach of Southern California's Saddleback Church, run by Rick Warren, author of best-selling book The Purpose Driven Life. Ssempa has a penchant for burning condoms. In 2007, he organized a rally against homosexuality to protest "homosexual agents and activists" who were "infiltrating Uganda." Asked how the anti-homosexuality bill might affect the fight against HIV and AIDS, Ssempa seemed bemused. "I don't see what this bill has to do with HIV," he told TIME. Warren, who has called Uganda a "purpose-driven nation," cut ties with Ssempa in October as controversy over the bill grew.

Despite Ssempa's beliefs, experts say the law would impede efforts to stem the spread of HIV and AIDS, especially among the category of "men who have sex with men"  the terminology often used because of the stigma around being openly gay or bisexual. Many homosexuals marry or date women and identify themselves as heterosexual even though they are sleeping with men. That community is disproportionately affected by the disease in sub-Saharan Africa, in part because of a long-standing unwillingness on the continent to acknowledge homosexuality. Indeed, the situation is one of double jeopardy, combining the pariah status of homosexuals in a deeply conservative culture with the stigma of AIDS, which until recently was perceived as a heterosexual disease in Africa, even by gay men. The "gay doctor," who has worked in AIDS wards, said he was stunned when he was told in 2000 that a gay friend may have contracted AIDS. "Most people think they can't get HIV through anal sex," says Grace, who leads a campus group for lesbian, gay, bisexual and transgender youth at Makerere University and did not want to give her full name.

To make matters worse, Uganda's ostrich-like denials on homosexuality seem to be tolerated by international donors such as Washington and the U.N. Even in 2009  a year when the U.S. President's Emergency Plan for AIDS Relief, known as PEPFAR, gave $285 million for HIV and AIDS programs in Uganda  just one program targeting "men who have sex with men" has been allowed to register with the government, a prerequisite for access to international funding. The program, the Most at Risk Populations Network, received just $5,000. "We used to print educational materials, but it was very expensive," Peter Yiga, of the Gay and Lesbian Alliance of Uganda, tells TIME. "We are lacking funding because we can't register. As an LGBT organization, it is very tricky to register in Uganda without getting arrested."

In 2004, UNAIDS' coordinator in Uganda, Ruben del Prado, was prematurely transferred to India after he quietly held meetings with LGBT groups about the possibility of prevention work among the community. The Ugandan government accused him of holding secret meetings with groups "that promote homosexuality." Since then, Western aid officials have been decidedly silent on the topic of homosexuality and HIV. Officials at UNAIDS, for example, say their organization has adopted a formal policy not to comment on the proposed law. A UNAIDS official in Uganda, who declined to be identified, says the group believes "quiet diplomacy" is the best approach.

The U.S. embassy in Kampala has said it opposes the bill, as have other American officials. Even Scott Lively recently declared that the bill's proposed prescriptions go too far. Rick Warren, however, seems to be avoiding tackling the subject directly. Although he cut ties with Ssempa, the popular preacher released a statement to Newsweek saying, "It is not my personal calling as a pastor in America to comment or interfere in the political process of other nations." That position irks the Rev. Kaoma, who is an Anglican pastor. Warren, he says, has immense influence among Uganda's political élite, counting many parliamentarians, including the country's First Lady Janet Museveni (who is reportedly close to Ssempa), among his friends. "He eats with them, he knows what goes on, they respect him," said Kaoma in a conference call. At the very least, Warren could get his purpose-driven nation to reflect on the purpose of this severe piece of legislation.