A federal judge Monday thwarted the Department of Justice’s attempt to completely ignore a budget amendment which blocked agents from cracking down on medical marijuana providers.

Monday’s ruling by Northern District of California Judge Charles Breyer means that the Department of Justice can no longer use funds to shut down medical marijuana providers in states where the drug is legal.

Continuing to harass providers using appropriated funds is illegal.

So long as medical marijuana providers are in compliance with state laws, they essentially are now untouchable by the DOJ, assuming the ruling holds on appeal.

Although the Rohrabacher-Farr budget amendment was approved by the House in June 2014, approved by the Senate Appropriations Committee and signed into law by President Barack Obama via the Consolidated and Further Continuing Appropriations Act of 2015 the same year, the DOJ had other ideas.

In effect, the department interpreted the amendment to mean that it could not impede the ability of states to carry out marijuana laws, leaving individuals or businesses as open targets. Republican Rep. [crscore]Dana Rohrabacher[/crscore] and Democratic Rep. [crscore]Sam Farr[/crscore] protested the department’s interpretation as “emphatically wrong” and asked for the inspector general July 30 to conduct an investigation of the DOJ.

Even before the amendment passed, DOJ lawyers complained that it would have a major impact on prosecutions. But after the amendment passed, the DOJ decided to reinterpret the amendment in opposition to congressional intent.

Breyer agreed with Rohrabacher and Farr’s assessment.

“It defies language and logic for the government to argue that it does not prevent California from implementing its medical marijuana laws by shutting down these…heavily regulated medical marijuana dispensaries,” he said in the ruling.

With the ruling issued, Lynnette Shaw will be able to reopen the Marin Alliance for Medical Marijuana, which counts as California’s first licensed dispensary.

“This is a big win for medical marijuana patients and their providers, and a significant victory in our efforts to end the federal government’s war on marijuana,” Dan Riffle, director of federal policies for the Marijuana Policy Project, said in a statement. “Federal raids of legitimate medical marijuana businesses aren’t just stupid and wasteful, but also illegal.”

“While an annual appropriations rider is a way to temporarily work around broken federal marijuana laws, Congress needs to take concrete steps to permanently resolve the tension between state and federal marijuana laws,” Riffle added. “Virtually every presidential candidate from both parties has said states should be able to determine their own marijuana laws, and multiple bills are pending in Congress that would allow them to do so. It is long past time those bills got the hearings and votes they deserve.”

It’s not clear whether Breyer’s ruling impacts criminal prosecutions.

Follow Jonah Bennett on Twitter

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.