A few days ago, after I heard the news that Congress had lifted a federal ban on funding for needle exchange programs, I called Alisa Solberg. She runs the Point Defiance AIDS Projects in Tacoma, Washington, which includes the oldest legally sanctioned needle exchange program in the country. With the ban gone, I wanted to know what it felt like to have the government accept what the evidence has shown for two decades: that needle exchanges can be a good way to prevent the spread of HIV and don’t increase drug abuse.

Solberg said her old boss Dave Purchase, a pioneer in the needle exchange movement who founded Point Defiance and died in 2013, would have said that by not funding an evidence-based, very simple intervention, the people who allowed the ban to remain in place were letting people die. To her, the news was still thrilling even though it won’t change the organization overnight. Point Defiance — which helps exchanges around the country with funding and program support in the face of the ban — figured out long ago how to run without the big federal dollars. “It’s a huge success, and we’ll celebrate and it’s great, but we would find a way to run without it,” she said of the lifted ban.

Although there has been fairly solid evidence for more than 20 years that the programs reduce the spread of infectious diseases, a series of laws banned the federal government from spending any money on them for nearly three decades. But in the final days of December, Congress quietly decided to change the 30-year-old ban on federal funding for needle exchange programs (the ban was briefly lifted in 2009 by President Obama and then reinstated by Congress in 2012).

For advocates, researchers and health workers who’ve worked on this issue for decades, it was a welcome, but bittersweet change. Lawmakers were moved to act not by the scientific research but by a large outbreak of HIV in Indiana last year.

Needle exchanges were the creation of HIV activists in the mid-1980s. The idea was straightforward: People who injected drugs were at high risk for contracting HIV through shared needles, so they should be given clean ones. But this was in the midst of the war on drugs era, and addicts were being portrayed as violent dangers to society, said Daniel Raymond, policy director for the Harm Reduction Coalition, a group that started in 1994 to support needle exchange programs. In 1988, Congress passed the first of several laws banning federal funding for such programs “unless the President of the United States certifies that such programs are effective in stopping the spread of HIV and do not encourage the use of illegal drugs.”

Ironically, the ban extended to funding for research. The public health community had to show that these programs were effective to get federal funding but couldn’t get support to do the research. Still, a convincing body of evidence from programs in Europe and Australia, as well as privately funded programs in the U.S., began to grow. By the time David Vlahov, who has been studying needle exchanges for more than 20 years and is now dean of the School of Nursing at the University of California, San Francisco, was asked to help write an Institute of Medicine report in 1995, he said, the evidence had mounted to a point where it was clear that the government should be willing to fund the programs to stop the spread of HIV.

There are dissenters, of course. A study from Montreal in 1997 found higher incidence of HIV among people using the program. There’s also a logistics problem, as noted in a 2010 review of existing research: Research on exchange programs is plagued by weak study methods, largely because doing high-quality research in what’s ultimately a small population is incredibly expensive. It’s also hard to control for selection bias because the people who use needle exchanges tend to be some of the people with the highest risk.

Still, the body of research to date has found that the programs reduce the spread of HIV. The World Health Organization, U.S. surgeon general’s office, and the federal Substance Abuse and Mental Health Services Administration have all said they work.

But despite the evidence, people inside the Beltway wouldn’t budge. Raymond, who worked with needle exchange programs in New York City before joining the Harm Reduction Coalition 10 years ago, recalled that whenever politicians, journalists or community members visited the programs in the 1990s, they were surprised by what they saw. “Their expectation was that it was some sort of crack den, or a drive-thru where we just tossed syringes out a window to someone,” he said.

At most exchanges, the needles are just one small part of the program. Many provide services like HIV testing, screening for hepatitis C, counseling or even referral to drug treatment programs. The research indicates that those ancillary services and the human connections make the programs successful, along with the sterility of the needles they provide. It’s those other programs that the federal government is now willing to pay for (the ban on paying for the actual syringes is still in place).

“It’s late, but it’s not useless,” Vlahov said. After a long pause, he said how disappointed he was that it took an outbreak of HIV in southern Indiana to prompt the change in federal law. As a result of that outbreak, Gov. Mike Pence, a vocal opponent of needle exchanges, allowed a temporary exchange to be set up. As of early last month, 184 people had tested positive for the virus in the outbreak, with the vast majority of those infections linked to injection drug use. That outbreak, amid the growing epidemic of opioid abuse, led to political shifts in some states whose legislators have long been against the programs.

It was Republican members of Congress from Kentucky and West Virginia, including Senate Majority Leader Mitch McConnell and House Appropriations Committee Chairman Hal Rogers, that made sure the ban was lifted in the recent spending bill. This support would have been unthinkable just a few years ago.

Right across over the border from Indiana, 30 miles from where the HIV outbreak hit, Louisville, Kentucky, opened the state’s first needle exchange in June of last year. Wayne Crabtree, an administrator of clinical services for the Louisville Metro Department of Public Health and Wellness, said that there was bipartisan, unanimous support from local council members to fund the program but that “it would have been a heck of a lot easier to set up without the bans.” When I asked how the program was going so far, he said it had nearly 1,700 participants. He thinks the program is essential, especially given the outbreak next door. “All it takes is a couple well-connected people in the community to pass the disease on,” he said. “That’s how it works — if we do nothing, we know we’ll have it here.”