A rogue County Attorney who tried to stop a medical marijuana dispensary from being opened in his jurisdiction on the basis that it violated federal, though not state or municipal law, has been put in his place by an Arizona Court of Appeals Tuesday.

Though Arizona legalized medical marijuana in 2010, one authority tried to deny the citizens of his region access to the plant. Maricopa County Attorney Bill Montgomery told county officials not to respond to dispensary certification requests and instructed them that if they did so, they would be violating federal drug laws.

A judge told the County Attorney that his arguments were faulty on multiple levels. Montgomery’s makeshift maverick law-sculpting came to a head when White Mountain Health Center was unable to obtain county certification, which eventually landed the attorney in court, as reported by the Arizona Capitol Times.

Judge Donn Kessler said that nothing in the federal Controlled Substances Act forbids states from passing their own drug laws. “Arizona, like all other states, has the power to decriminalize certain acts and exempt certain actors for purposes of state law,” he wrote.

Furthermore, for a local employee to violate federal law by enforcing a state one, that law would have to negate federal law or prevent the federal government from enforcing their laws, which Arizona medical marijuana laws do not do. “The Arizona Medical Marijuana Act does not otherwise purport to shield anyone or any act from federal prosecution,” Kessler wrote.

Montgomery is an outspoken anti-weed figure who recently said at a press conference that the Trump administration should “underscore that we are a nation of laws and not men” and “end the charade” of medical marijuana. Or, failing that, “Arizona should be able to pass its own immigration laws, should be able to pass its own laws and regulation on abortion, and the federal government should stay out of our business.” So, cool guy.

Hopefully this court decision will be a setback for more deeply uncool, rogue anti-pot authorities like Montgomery across the county.