On Tuesday, the U.S. Court of Appeals for the 9th Circuit handed medical marijuana patients a huge legal victory, barring the federal government from prosecuting patients, growers, and dispensaries that follow state medical marijuana laws. The emphatic decision may finally persuade the Department of Justice to halt its campaign against medical marijuana, which remains illegal under federal law but has been legalized in 25 states and the District of Columbia. It arrives just days after the Obama administration announced new rules permitting many more research institutions to grow the plant and use it in clinical trials.

At issue in Tuesday’s decision is a congressional appropriations rider passed in 2015 and renewed in 2016. Approved with bipartisan support, the rider barred the DOJ from spending any funds in a way that would prevent states from “implementing their own State laws that authorize the use, distribution, possession, or cultivation of medical marijuana.” The rider’s supporters explicitly stated that its purpose was to halt federal prosecution of medical marijuana patients, growers, and dispensaries.

But the DOJ argued that the rider did not, in fact, impede its prosecution of those involved with medical marijuana: In court, the department argued that it could still go after individual patients, growers, and dispensaries, because scattered prosecutions would not block the state from implementing its medical marijuana laws more broadly. So long as the DOJ did not take legal action against the state itself, its attorneys argued, it could still prosecute individuals and comply with the rider.

The 9th Circuit vigorously rejected this tortured sophistry, which one federal judge previously castigated as “at odds with fundamental notions of the rule of law.” In an opinion by Judge Diarmuid O’Scannlain, a Reagan appointee, the court affirmed that when the federal government prosecutes medical marijuana users and growers, “it has prevented the state from giving practical effect to its law” legalizing medical marijuana use and distribution. And that, of course, is precisely what the rider was meant to proscribe. Thus, so long as patients, growers, and dispensaries adhere to the applicable state law, they may not be prosecuted by the federal government.

As Marc Zilversmit, who helped to litigate the 9th Circuit case, recently argued in Slate, Congress’ use of spending restrictions to bar medical marijuana prosecutions fits neatly into the Framer’s constitutional design. Zilversmit explained:

Congress was using the “power of the purse” as a check on executive power, one of its most important constitutional prerogatives. As James Madison wrote in the Federalist Papers, this power “may, in fact, be regarded as the most complete and effectual weapon with which any constitution can arm the immediate representatives of the people, for obtaining a redress of every grievance, and for carrying into effect every just and salutary measure.”

Unfortunately for medical marijuana patients, however, this rather makeshift approach to easing medical marijuana restrictions has a drawback: Congress could easily drop the rider from the next appropriations bill, allowing the DOJ to pick up where it left off and continue sending medical marijuana patients and growers to prison. In that sense, Tuesday’s victory is rather tenuous. And until the federal government gets serious about cannabis reform, tenuous relief is all medical marijuana patients can hope for.