The Department of Justice cannot spend money to prosecute people who violate federal drug laws but are in compliance with state medical marijuana laws, a federal court ruled on Tuesday. The ruling prevents federal law enforcement from funding prosecution of anyone who obeys a state’s medical marijuana laws.

The ruling comes after a 2014 Congressional law that prohibited the DOJ from interfering in state implementation of marijuana laws. That law led people being prosecuted by the federal government to seek the dismissal of their charges, arguing they were in compliance with state law. On Tuesday, the 9th Circuit Court of Appeals agreed, sending their cases back to lower courts to determine if they were in compliance with state laws. Some of the defendants ran Los Angeles based marijuana stores and faced charges for distributing 100 marijuana plants.

Reuters reports the ruling comes as nine more states will decide whether to allow recreational marijuana use in November. Colorado, Oregon, Washington and Alaska currently allow recreational marijuana use. Twenty-five states allow marijuana for medical use.

Tuesday’s decision by a three-judge panel was unanimous. But in its opinion, the court warned Congress could change its mind and again allow federal funding for prosecution of state-sanctioned marijuana use. “DOJ is currently prohibited from spending funds from specific appropriations acts for prosecutions of those who complied with state law,” the Court wrote. “But Congress could appropriate funds for such prosecutions tomorrow.”