A 2015 survey by the Health Department that found that 57 percent of young gay men at risk for infection are currently high school or college students, and 67 percent of people currently living with H.I.V. are between the ages of 15 and 24.

While the department runs several anti-H.I.V. programs, it faces a huge gap in reaching young people. Filipinos under 18 are required by law to have parental consent to buy condoms, to get them from health centers or to get tested for H.I.V.

Laws limiting government distribution of contraceptives have played a large part in preventing extensive condom distribution drives, a proved method of prevention. People who want condoms can get them from the health centers, but the centers do not do outreach to the people mostly likely to be exposed to H.I.V., and there are few public health services specifically aimed at those vulnerable groups.

These barriers leave authorities relying more heavily on a strategy known as “treatment as prevention” — using antiretroviral therapy to decrease the chances of passing H.I.V. to others, coupled with testing drives, as a way to stop the spread of the virus.

While such an approach can be helpful if a large number of people who have H.I.V. know they have it and get treatment, in the Philippines both testing and awareness are low, and experts say that effective H.I.V. prevention requires a response that combines all proved methods. Focusing on treatment as prevention, they say, is more expensive and less effective than an approach that emphasizes safe-sex practices and education.

“All good and successful national AIDS programs use condoms,” Mr. Kraus said. Of the countries that have posted 30 to 35 percent reductions in new H.I.V. infections, “a lot of those reductions have been the result of comprehensive condom programming.”