A study published Tuesday in the journal Clinical Infectious Diseases showed the controversial daily pill preexposure prophylaxis (PrEP) prevented HIV infection in all 657 patients who took it for two and a half years.

The Food and Drug Administration (FDA) in 2012 approved a fixed-dose treatment of emtricitabine and tenofovir for people who do not have HIV but may be at risk of contracting it. Those antiviral drugs comprise PrEP, sold under the brand name Truvada, which can keep HIV infection at bay when an individual is exposed from injection drug use or unprotected sex.

“Our study is the first to extend the understanding of the use of PrEP in a real-world setting and suggests that the treatment may prevent new HIV infections even in a high-risk setting,” lead author Jonathan Volk, MD, MPH, physician and epidemiologist at Kaiser Permanente San Francisco Medical Center, said in a news release. “Until now, evidence supporting the efficacy of PrEP to prevent HIV infection had come from clinical trials and a demonstration project.”

Previous clinical trials of the drug suggested it had a prevention rate of about 86 percent, not 100 percent as the current study does.

Critics say the daily pill encourages risky sex among gay and bisexual men, whom the virus disproportionately affects. Following the drugs approval, #Truvadawhore T-shirts emerged, and some AIDS activists hailed it a “party drug.” But proponents say the drug has the potential to help prevent future infections of a virus that today plagues nearly 40 million people worldwide— especially among individuals who don’t have access to condoms.

In the Kaiser Permanente study, HIV infection was prevented despite participants’ changing sexual behavior, including number of partners and condom use, six months into the study.

What researchers have not reported is the participants’ adherence to the drug, which is prescribed as a daily pill, and they noted that while HIV infections were prevented among the entire study group, Truvada did not halt infection of other sexually transmitted infections (STIs). Six months after participants began taking the drug, 30 percent had been diagnosed with at least one STI. And at 12 months, 50 percent had been diagnosed with any STI; 33 percent had a rectal STI, 33 percent had chlamydia, 28 percent had gonorrhea, and 5.5 percent had syphilis.

“Without a control group, we don’t know if these STI rates were higher than what we would have seen without PrEP,” co-author Julia Marcus, PhD, MPH, postdoctoral fellow at the Kaiser Permanente Division of Research, said in the news release.

Bradley Hare, MD, director of HIV Care and Prevention at Kaiser Permanente San Francisco said in the release that people taking Truvada should undergo routine STI and HIV testing. The Centers for Disease Control and Prevention (CDC) recommends that people on PrEP get tested for STIs every six months. Hare also advised those individuals to monitor themselves for known side effects from the drug, like changes in kidney function.

Although the current study suggests some limitations for the drug, experts say the findings hold promise for stopping HIV in its tracks.

According to the CDC, more than 1.2 million people in the United States are living with HIV infection, and one in eight people infected with virus are not aware of it. About one in four new HIV infections is among people ages 13 to 24.

The Department of Health & Human Services estimates that 50,000 Americans are diagnosed with HIV each year—with African American and black males being particularly at risk. More than 13,700 people diagnosed with AIDS, the syndrome that develops with advanced-stage HIV infection, died in 2012, and about 658,500 Americans diagnosed with AIDS have died overall.

In an accompanying commentary for the study, Kimberly A. Koester and Robert M. Grant, of the University of California, San Francisco, who were not involved in the research, described the study results as “tremendously good news.”

“It is time for a vigorous conversation about sexually transmitted infections, too long eclipsed by fear of HIV infection,” they wrote.