When agents from the Drug Enforcement Administration raided a remote farm in Humboldt County five years ago, they found plenty to incriminate the owners, Anthony Pisarski and Sonny Moore.
More than 300 marijuana plants were growing in a pair of greenhouses. Agents found guns in a house on the sprawling property and about $225,000 in cash, much of it bundled in vacuum-sealed pouches, hidden in a garage and some pickup trucks. Later searches uncovered another large stash of cash, along with bars of gold and silver.
Pisarski and Moore ultimately pleaded guilty to a federal charge of conspiring to manufacture and sell marijuana.
But in a ruling believed to be the first of its kind, a judge last week put a stop to the case before the men were sentenced to prison. The judge found he had no choice but to call off prosecutors in light of an unusual budget rule in Congress that forbids federal law enforcement from interfering with states where medical marijuana is legal.
The decision by U.S. District Judge Richard Seeborg in San Francisco illustrates for the first time what could be a serious legal hurdle if U.S. Atty. Gen. Jeff Sessions, a fierce marijuana opponent, decides to crack down on medical marijuana, which remains illegal under federal law. While it remains to be seen how many other marijuana cases will be closed down like the one in San Francisco, supporters of states' authority to legalize pot hailed the decision and said they hoped it served as a check on Sessions.
"This is a signal that hopefully will go totally across the country — that federal prosecutors should stop wasting their time and start focusing on real criminals," U.S. Rep. Dana Rohrabacher (R-Costa Mesa), who has led a legislative campaign to rein in the Justice Department on medical marijuana cases, said of the judge's order. "My conservative friends like Jeff [Sessions] need to look themselves in the mirror and say, 'We don't like these people smoking marijuana, but they do have a right to do it because it's their lives, not the government's.' "
The ruling hinged on a short amendment written by Rohrabacher and then-U.S. Rep. Sam Farr (D-Carmel), who recently retired, to an appropriations bill in late 2014 that authorized government spending for the upcoming year.
Though brief, the amendment was meant to have a significant effect: It forbade the Department of Justice from using funds in a way that obstructed a state "from implementing their own state laws that authorize the use, distribution, possession or cultivation of medical marijuana." Congress has renewed the prohibition each year since.
Until now, U.S. district judges had rejected attempts by defendants to argue that the amendment applied to their cases. In a case in Fresno involving a man convicted of illegally operating a marijuana cooperative, for example, a judge found the man had violated California's medical marijuana law by selling marijuana for profit and therefore was fair game for federal prosecution.
One unresolved legal question is whether the spending ban also applies to people who have already been convicted and are serving sentences on marijuana charges, since the Bureau of Prisons and U.S Marshals Service are arms of the Department of Justice.
Still, the immediate impact of last week's ruling is likely to be limited.
The number of people facing federal drug charges for marijuana violations in the 29 states that have made medical marijuana legal is not thought to be large. Under the Obama administration, the Justice Department followed a policy that generally shied away from prosecutions as long as a state had in place strict measures to prevent drugs from being sold to minors, money flowing to drug cartels, marijuana being diverted to states where the drug was illegal and other potential problems.
But with Sessions ratcheting up his rhetoric and leaving open the possibility he will launch a crackdown on marijuana, the legal defense offered up by the spending ban could present a formidable roadblock going forward.
In a letter he sent in May, Sessions urged congressional leaders to do away with the spending amendment. Along with the health and societal risks he said marijuana posed, the attorney general said the ban was helping organized crime infiltrate medical marijuana markets.
"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," he wrote.
A spokesperson for the Justice Department did not respond to requests for comment.
For Pisarski and Moore, the budget amendment offered a last-minute lifeline.
The amendment was added when the pair were only days away from being sentenced. Prosecutors were asking the judge to send the men to prison for nearly three years.
The pair owned 242 remote acres of property that included a house, a warehouse and two greenhouses where agents discovered 320 growing marijuana plants, according to court records filed by the U.S. attorney's office. Federal agents found a loaded firearm in both of their bedrooms. Among the evidence seized was $189,000 in cash that had been welded inside the lining of a trailer.
Pisarski's attorney, Ronald Richards, made an emergency request to postpone the sentencing in order to see if the amendment would be signed into law.
The judge agreed, and when the spending rule, which passed with broad bipartisan support, became law, Richards said he sent emails to public defenders and other defense attorneys across the country to alert them to the new legal avenue the amendment opened in marijuana cases.
The curb on Justice Department spending was viewed at the time as a turning point after years of conflict between federal authorities intent on upholding the nation's drug laws and states where medical marijuana had been made legal. In light of the ban on spending, it was assumed federal prosecutors would have no choice but to abandon marijuana cases.
Justice Department officials, however, balked at such an expansive interpretation of the amendment. They acknowledged the spending ban prohibited them from meddling in the affairs of state officials but did not accept that it prevented them from going after producers and sellers like Pisarski and Moore.
Richards and Moore's attorney sought to push back the sentencing over and over as the legal landscape on marijuana cases continued to shift.
Last year, the 9th Circuit Court of Appeals ruled that defendants in California and other states in the court's jurisdiction with medical marijuana laws were entitled to a hearing to determine whether they had been in compliance with those state laws. If defendants could demonstrate that they had abided by state rules, prosecutors were to be blocked from pursuing federal drug charges, the court said.
Last month, Seeborg held a hearing for Pisarski and Moore. Their attorneys argued the marijuana plants the men grew were earmarked for two nonprofit collectives that distributed it to its members in line with California regulations. In a court filing, Pisarski told the judge he needed guns at the house to protect himself against "mountain lions, pigs with big teeth and bears" when he was outside at night.
The government countered that the men had not proved that all the members of the collective were legitimate and that the guns, cash and gold indicated the men planned to sell the pot for profit.
On Tuesday, Seeborg sided with Pisarski and Moore, saying the men were under no burden to verify that members of the collectives were qualified to belong. He acknowledged that the money and weapons could be signs of a criminal operation, but said they were "equally consistent with the operation of a rural, cash-intensive enterprise."
In his ruling, Seeborg echoed the 9th Circuit when he emphasized his decision was valid only as long as Congress continues to renew the spending restrictions on the Justice Department.
Having admitted their guilt but not been sentenced, Pisarski and Moore find themselves in an odd legal limbo. Prosecutors in their case did not respond to requests for comment, leaving it unknown whether the U.S. attorney in the Northern District of California will ask for the case to be dismissed or try to wait to see if Congress does an about-face.
Rohrabacher said Congress recently included the amendment again in a stop-gap omnibus spending bill and that he expects it to be part of future spending agreements.
"The public is already there," Rohrbacher said. "Our government is supposed to reflect the will of the people and those conservatives who are dedicated to trying to protect adults from themselves have already lost the argument."
Follow @joelrubin on Twitter