A federal appeals court has held that the government can enforce federal drug laws on federal lands, even in a state that’s legalized medical marijuana such as California.

The U.S. Court of Appeals for the Ninth Circuit on Thursday found that although Congress has prohibited the U.S. Department of Justice from using appropriated funds in ways that prevent states from implementing medical marijuana laws, it didn’t bar it from prosecuting marijuana cases altogether.