Over the past 15 years the U.S. has spent $1.4 billion promoting abstinence before marriage as a way of preventing HIV in 14 countries in sub-Saharan Africa. Unfortunately, according to the most comprehensive, independent study conducted to date of the effort, the money was pretty much wasted. A rigorous comparison of national data from countries that received abstinence funding under the 2003 U.S. President’s Emergency Plan for AIDS Relief (PEPFAR) with those that had not showed no difference in the age of first sexual experience, number of sexual partners or teenage pregnancies—all aspects of behaviors that have been linked to a higher risk of becoming infected with HIV.

Instead, the study showed, the single most important factor associated with lower levels of risky behavior was the number of years women remained in school. Other efforts that have proved effective in slowing the spread of HIV include treating the infection in pregnant women so they do not pass the virus on to their newborns. The study was published in the May Health Affairs by Nathan Lo, Anita Lowe and Eran Bendavid of the Stanford University School of Medicine. “When I started this study about two years ago, I had assumed that this [analysis] had already been done,” Lo says. Much to his surprise, he discovered that it had not. Lo and company looked at national health data that had been collected from more than 130,000 men and 345,000 women under age 30 from 1998 to 2013 to make their calculations.

So why did PEPFAR spend so much money on abstinence programs? That was Congress’s idea. Responding to pressure from religious conservatives, the legislature mandated in 2003 that at least a third of PEPFAR’s prevention budget be spent on telling people to refrain from sex before marriage. That specific requirement was dropped in the 2008 bill that reauthorized the program and PEPFAR has spent progressively less money on abstinence education over the intervening years. Still, the study’s authors point out, PEPFAR allocated $45 million to abstinence education in 2013. “There is a big opportunity cost there,” Lo says. “It’s not necessarily a benign expenditure.”

When contacted for a response, a PEPFAR spokesperson released this statement: “Since its inception, PEPFAR’s mission has been to prevent as many new HIV infections and save as many lives as possible toward controlling the HIV/AIDS epidemic. To fulfill this mission, PEPFAR has continually evolved its approach to, and investments in, HIV prevention based on the latest scientific evidence and lessons learned from applying this evidence in programs. Current prevention science demonstrates that a combination package of evidence-based behavioral, biomedical and structural prevention interventions tailored to the populations and geographic areas with the greatest burden is most effective in addressing the epidemic.”

Although the latest findings about PEPFAR’s prevention efforts are disappointing—if not infuriating—its treatment programs have been entirely more successful. A previous study by Bendavid in 2009 and another in 2012 showed that the government initiative has saved at least a million lives by making anti-HIV medications more widely available for those who need them.