A federal appeals court gave medical marijuana advocates what seemed like a big win this week with a unanimous ruling that the federal government cannot prosecute people who grow and distribute medicinal cannabis if they comply with state laws.

The decision affirms a mandate from Congress that barred the U.S. Department of Justice in 2014 and 2015 from bringing cases against legitimate pot shops in states that have medical marijuana laws. It makes clear that if operators are meticulously following the rules, they shouldn’t have to worry about the feds coming after them.

But this week’s ruling by the 9th Circuit Court of Appeals came with a big warning: This is a temporary victory. Until the federal government legalizes marijuana or until lawmakers adopt a permanent policy shielding states from federal enforcement, medical marijuana shops still face the possibility of prosecution in the future.

More than half the states allow people to grow, sell and use marijuana for medical purposes. But advocates complained they were still being raided and prosecuted by federal law enforcement because the drug remains illegal under federal law. In 2014 and again in 2015, Reps. Sam Farr, D-Calif., and Dana Rohrabacher, R-Calif., successfully pushed through an amendment that prohibited the Department of Justice from spending funds in those budget years to prevent states from implementing their medical marijuana laws. (Their amendment does not apply to the recreational use of marijuana, which four states and the District of Columbia allow, and which California will consider allowing with Proposition 64 in November.)

However, federal prosecutions continued, and 10 growers and dispensary operators in California and Washington appealed their cases, arguing they were protected by the Rohrabacher-Farr amendment. The 9th Circuit agreed — for the most part. The court sent the cases back to district courts, where the operators would have an opportunity to prove they “strictly complied” with state laws. If they did, they should not face charges. If not, they could still be prosecuted.

Advocates hailed the decision as a major setback for the federal government’s tough-on-marijuana policies. But Judge Diarmuid F. O’Scannlain, writing in a lengthy footnote to the ruling, threw cold water on that idea.

“To be clear,” the judge wrote, the amendment “does not provide immunity from prosecution for federal marijuana offenses.” Nor, he added, “does any state law ‘legalize’” marijuana. All the Rohrabacher-Farr amendment does is temporarily block the Justice Department from spending money on medical marijuana prosecutions; it will expire in September, unless extended. Congress could restore funding tomorrow, or the next president could reverse the Obama administration’s detente, and prosecutions could restart. That leaves medical marijuana businesses and users in legal limbo and undermines public confidence if people are asked to vote to legalize something that might not ultimately be allowed under federal law.

One way or another, the conflict between state and federal laws must be addressed. The current situation — in which marijuana is illegal at the federal level but half of the states allow medical marijuana, four states allow recreational use and five more will consider recreational legalization in November — is untenable.

— Los Angeles Times