Scott Wiener, a member of the San Francisco Board of Supervisors, made an unusual public announcement on Wednesday: He takes Truvada, a daily antiviral pill, to greatly reduce his risk of contracting H.I.V.

Taking the pills is a practice known as pre-exposure prophylaxis, or PrEP, and some researchers believe it may reduce the risk of infection by 99 percent if patients take their medication daily as prescribed. Approved by the Food and Drug Administration in 2012, PrEP has increasingly been embraced by public health authorities and is one of three planks of Gov. Andrew Cuomo’s plan in New York to sharply cut new H.I.V. infections.

But it carries a stigma in some parts of the gay population, and Mr. Wiener appears to be the first public official to disclose that he’s personally on it.