Demonstrating that taking a daily pill to prevent H.I.V. infection can work in the real world, San Francisco’s largest private health insurer announced Wednesday that not one of its 657 clients receiving the drug had become infected over a period of more than two years.

That outcome contradicted some critics’ predictions that so-called pre-exposure prophylaxis, or PrEP, would lead to less condom use and more H.I.V. infections.

A study published in Clinical Infectious Diseases found that the San Franciscans on PrEP, almost all of whom were gay men, did use fewer condoms — and contracted several other venereal diseases as a result. But none got H.I.V.

Most other sexual infections, while potentially dangerous, can be cured with antibiotics. H.I.V. cannot, though it can be controlled with antiretroviral drugs taken for life.