But insurance brokers, gay-rights advocates and staff at medical clinics said in interviews they had heard of numerous such cases. H.I.V. specialists say the denials endanger men’s lives by encouraging them to drop PrEP if they need life, disability or long-term-care insurance.

By contrast, health insurance companies usually cover PrEP, which the Centers for Disease Control and Prevention endorsed in 2014 for anyone at substantial risk of H.I.V., which includes any gay or bisexual man who might have sex without a condom with anyone of unknown H.I.V. status.

The denials turn the insurance industry’s risk-management standard on its head: men who do not protect themselves can get policies, while men who do cannot.

“It doesn’t make any sense,” said Dr. Anthony S. Fauci, director of the National Institute of Allergy and Infectious Diseases, and perhaps the nation’s best-known AIDS doctor. “It ought to be the other way around.”

Dr. Robert M. Grant, the AIDS researcher at the University of California, San Francisco, who led the clinical trial that established the value of PrEP, said such denials “really are silly — it’s like refusing to insure someone because they use seatbelts.”

Moreover, advocates argue, the practice singles out gay men for discriminatory treatment. Women, for instance, are not denied coverage if they use birth control pills or get the vaccine against human papillomavirus, which can cause cervical cancer. Yet like Truvada, use of these drugs suggests an active sex life, with the accompanying risks.

And insurers routinely cover applicants with actual diseases controlled by medications, including diabetes, epilepsy, high blood pressure and bipolar disorder.