SAN FRANCISCO — Over a cup of tea at a downtown Starbucks, Michael Rubio recalled how four friends became H.I.V. positive through unprotected sex, all within a year. The news shocked Mr. Rubio, a 28-year-old gay man, into trying a controversial new form of H.I.V. prevention: a daily pill that studies show is highly effective in protecting people from infection.

“With my inner circle so affected in the last year, it was a no-brainer to consider this for my life right now,” said Mr. Rubio, a front-office coordinator at the Positive Resource Center, a social service agency for people with H.I.V.

The very existence of that option represents a startling turn in the too-long history of the AIDS epidemic. Many health experts hoped that the medication — Truvada, a combination of two antiviral drugs that has been used to treat H.I.V. since 2004 — would be exuberantly embraced by H.I.V.-negative gay men. Instead, Truvada has been slow to catch on as an H.I.V. preventive in the 18 months since the strategy’s approval by the Food and Drug Administration. In some quarters, the idea that healthy gay men should take a medication to prevent infection — an approach called pre-exposure prophylaxis, or PrEP — has met with hostility or indifference.

“It’s gotten tons of attention at H.I.V. meetings as a new tool for prevention, and I consider it an important option for the right person,” said Dr. Lisa Capaldini, a primary care doctor here who treats many gay men. “And yet there’s been very little interest among my patients. There’s a fascinating disconnect.”