A congressional committee voted Thursday to extend protections of state medical marijuana programs against federal interference, in defiance of a request from Attorney General Jeff Sessions earlier this year urging his former colleagues to abandon the policy.

The Senate Appropriations Committee passed an amendment, introduced by Sen. Patrick Leahy (D-Vt.), that would add a clause to the Commerce, Justice, Science, and Related Agencies (CJS) fiscal year 2018 budget that blocks the Department of Justice from using funding for federal prosecutions of medical marijuana providers that are legalized by individual states or jurisdictions.

Twenty-nine states, the District of Columbia, and the U.S. territories of Guam and Puerto Rico have all enacted medical marijuana laws (17 other states have laws allowing limited use of cannabidiol, or CBD, the non-psychoactive ingredient in pot that holds promise for therapeutic use). Despite the majority of states’ efforts to move away from prohibition, the plant remains illegal at the federal level.

Lawmakers have been renewing the medical marijuana provision, commonly known as the Rohrabacher-Farr amendment, which prohibits DOJ from prosecuting state-legal medical marijuana operations, in every consecutive budget since it first passed in 2014. The amendment requires annual renewal and has been every year since it first passed.

Last year, the U.S. Court of Appeals for the 9th Circuit unanimously ruled that the Rohrabacher-Farr amendment blocks federal officials from prosecuting state-legal marijuana operators and patients.

This vote is not only a blow against an outdated Reefer Madness mindset, it is a personal rebuke to Jeff Sessions. Tom Angell, chairman of drug policy reform group Marijuana Majority

But the move stands in contrast to Sessions’ earlier stated wishes. Sessions, a vocal opponent of marijuana and progressive drug policies, sent a letter to Congress in May urging them not to renew the protections into next year.

“I believe it would be unwise for Congress to restrict the discretion of the Department to fund particular prosecutions, particularly in the midst of an historic drug epidemic and potentially long-term uptick in violent crime,” Sessions wrote in the letter, first reported by MassRoots’ Tom Angell.“The Department must be in a position to use all laws available to combat the transnational drug organizations and dangerous drug traffickers who threaten American lives.”

Now, if the CJS budget is ultimately approved in the full Senate, the bill, along with the medical marijuana amendment, will go to a special committee to reach a compromise with the House. If a budget is not approved by the end of September, the previous amendment will be automatically renewed for another year.

“This vote is not only a blow against an outdated Reefer Madness mindset, it is a personal rebuke to Jeff Sessions,” Tom Angell, chairman of drug policy reform group Marijuana Majority, said in a statement. “The attorney general, in contravention of President Trump’s campaign pledges and of public opinion, specifically asked Congress to give him the power to arrest and prosecute medical marijuana patients and providers who are following state laws. A bipartisan group of his former Senate colleagues just said no.”

Don Murphy, director of conservative outreach for the Marijuana Policy Project, strongly urged Congress to include the amendment in its final budget.

“Even if you are one of the few people who don’t support medical marijuana, states should still have the right to help their most vulnerable residents,” Murphy said in a press release. “They should not have to worry about the Department of Justice interfering.”

Despite Sessions’ retrograde views on the plant, the trend of state-level legalization reflects a broader cultural shift toward acceptance of marijuana, the most commonly used illicit substance in the United States. National support for marijuana legalization has risen dramatically in recent years, reaching historic highs in multiple polls. Medical marijuana in particular enjoys extraordinary support. A Quinnipiac poll from earlier this year found that 94 percent of Americans support allowing adults to use marijuana for medical purposes if their doctor prescribes it.