SAN FRANCISCO — A federal appeals court on Tuesday banned the Justice Department from prosecuting medical marijuana cases if no state laws were broken.

A three-judge panel of the 9th U.S. Circuit Court of Appeals in San Francisco ordered the federal agency to show that 10 pending cases in California and Washington state violated medical marijuana laws in those states before continuing with prosecutions.

Marijuana remains illegal under federal law, but Congress has barred the Justice Department from spending money to prevent states from regulating the use or sale of medical pot.

Federal prosecutors argued unsuccessfully that Congress meant only to bar the department from taking legal action against states and that it could still prosecute individuals who violate federal marijuana laws. The court rejected that, saying that medical marijuana-based prosecutions prevent the states from giving full effect to their own measures.

“If DOJ wishes to continue these prosecutions, Appellants are entitled to evidentiary hearings to determine whether their conduct was completely authorized by state law, by which we mean that they strictly complied with all relevant conditions imposed by state law on the use, distribution, possession, and cultivation of medical marijuana,” Judge Diarmuid F. O’Scannlain wrote for the panel.

Federal prosecutors could ask the 9th Circuit to reconsider the case or petition the U.S. Supreme Court to take up the issue. Justice Department spokesman Peter Carr said officials are still reviewing the decision.

Marijuana activists and lawyers representing medical pot suppliers say the ruling is a significant addition to the growing support for broad legalization of the drug. Marijuana is legal for medicinal or recreational use in 25 states and the District of Columbia. In addition, ten states have marijuana legalizations measures on the November ballot.

“This is the beginning of the end of federal prosecutions of state medical marijuana dispensary operators, growers and patients,” said Marc Zilversmit, an attorney representing five people who operate four marijuana stores in Los Angeles and nine indoor growing sites in Los Angeles and San Francisco.

Still, Zilversmit and other medical marijuana supporters said the Obama administration and federal authorities are still fighting the drug’s legalization.

On Thursday, the Obama administration announced that marijuana will remain on the list of most dangerous drugs, but said it will allow more research into its medical uses.

The Drug Enforcement Administration said the agency’s decision came after a lengthy review and consultation with the Health and Human Services Department, which said marijuana “has a high potential for abuse” and “no accepted medical use.” The decision means that pot will remain illegal for any purpose under federal law.

Rep. Earl Blumenauer, an Oregon Democrat who helped draft the language barring the Justice Department and its 93 U.S attorneys across the country from spending money on medical marijuana prosecutions said the “DOJ has been a little slow to pick up on” lawmakers’ desire that prosecutors go after organized drug rings and leave alone medicinal pot sellers and users..

“Congress is increasingly united in the recognition that we should not interfere with what states are doing with medical marijuana,” Blumenauer said. “Unfortunately we’ve got the DEA and 93 U.S. attorneys who have people that are still frying little fish.”

___

Johnson reported from Seattle.