Black gay and bisexual men, who represent 60 percent of the nearly 17,000 black Americans annually who are given H.I.V. diagnoses, are at particularly high risk: The Centers for Disease Control and Prevention predicts that one of every two men in this population will contract H.I.V. if current rates persist. Diagnosis and treatment have become simpler than ever, yet many black gay and bisexual men get H.I.V. care only in the later stages of illness, when they are more likely to transmit the infection and to suffer severe ailments or death.

Among researchers who study behavior associated with H.I.V. transmission, this is attributed to stigma directed at H.I.V., homosexuality, or both. Studies have shown that stigma, whether real or perceived, damages the health of people with H.I.V. They conceal their H.I.V. status, so they skip taking medicine when it can’t be done in secret. It also causes others to avoid H.I.V. testing, which means they can unknowingly transmit the virus. Stigma contributes to social isolation and poor mental health, risk factors for substance use and health care avoidance — factors that themselves can increase H.I.V. transmission.

Black Americans have higher levels of homophobia and stigma about H.I.V. than other groups. “To address it, you almost have to work with churches,” said Amy Nunn, assistant professor at the Brown University School of Public Health and director of the Rhode Island Public Health Institute, where she has conducted research on faith-based H.I.V. initiatives.

Morris Singletary knows all about how stigma can distance men like him from the black church: as a youngster in Atlanta, church was his life — but for nine years after his 2006 H.I.V. diagnosis, his faith was shaken. “Basically, I almost committed suicide without committing suicide,” he told me. Mr. Singletary couldn’t reconcile his existence with his church’s teachings about the sinfulness of homosexuality.

Eventually, he concluded that those teachings were not the true word of God, but the oral tradition of flawed humans — “I am an independent thinker,” he said. His voice rose when he talked about what others endure at the hands of church-based stigma: “No one should ever question,” he said, that “when you walk in a place that’s safe, that is built on love, if you’re going to get that love regardless of what they call your sin.”