Local officials cannot use federal laws outlawing marijuana to refuse to provide necessary zoning for dispensaries, the state Court of Appeals ruled Tuesday.

In their unanimous decision, the judges acknowledged the federal Controlled Substances Act makes the possession and sale of marijuana a felony. And they noted that the zoning sought by White Mountain Health Center was specifically to be able sell the drug from a shop in an unincorporated area of Sun City.

But Judge Donn Kessler said Maricopa County Attorney Bill Montgomery had no legal basis to claim that federal law trumps the 2010 voter-approved Arizona Medical Marijuana Act. And he also rejected Montgomery’s contention that having county officials issue the required zoning would mean they were aiding and abetting in the violation of federal law.

The fight has its roots in the 2010 initiative that allows those with a doctor’s recommendation and a state-issued ID card to obtain up to 2 1/2 ounces of marijuana every two weeks. That law also set up a network of state-regulated privately run dispensaries to sell the drug.

Before issuing a permit for a dispensary, state health officials need certification from the local government that the site is properly zoned. White Mountain Health, seeking to locate in Sun City, sought the necessary certification from Maricopa County.

But Montgomery instructed county officials not to respond. He argued that doing so would make them guilty of violating federal laws that prohibit not just the possession and sale of marijuana but doing anything to facilitate either.

And he contended that anything the state does cannot preempt federal law.

Kessler said there are several flaws with that argument. He said nothing in the Controlled Substances Act prohibits states from having their own drug laws.

More to the point, Kessler said the fact that Arizona has chosen to legalize the possession and sale of marijuana simply immunizes those involved from being prosecuted under Arizona law.

“Arizona, like all other states, has the power to decriminalize certain acts and exempt certain actors for purposes of state law,” Kessler wrote. He said there is no conflict with federal law because nothing that Arizona does precludes the federal government, if it wants, from enforcing its own laws.

“The Arizona Medical Marijuana Act does not otherwise purport to shield anyone or any act from federal prosecution,” Kessler wrote.

And the court rejected Montgomery’s contention that county officials would be guilty of aiding and abetting others to violate the Controlled Substances Act.

“To aid and abet, a person must associate himself with the venture and participate in it as in something that he wishes to bring about and seeks by his actions to make it succeed,” Kessler noted. He said there is no way to conflate the simple zoning matter as actively aiding and abetting in the sale of the drug.

And there’s something else

Kessler pointed out that a provision of a 2015 federal appropriations act specifically prohibits the U.S. Department of Justice from using any of its funds to prevent Arizona from implementing its own laws on the use, distribution, possession or cultivation of medical marijuana. That, he said, eliminates any basis to argue that county officials who are simply doing what the 2010 Arizona law requires might find themselves facing charges of violating federal laws.

The dispensary has since been built, with state health officials using earlier court rulings to conclude that they did not need to wait for the county certification. But Tuesday’s ruling undermines future attempts by local governments to try to use federal laws to derail marijuana dispensaries.

This isn’t the first time Arizona courts have rejected arguments by prosecutors that federal laws trump what voters approved in 2010.

Three years ago the Arizona Supreme Court ordered the Yuma County Sheriff’s Office to return marijuana that had been seized from a patient.

That case involved a California medical marijuana patient whose drugs were confiscated at a Border Patrol checkpoint near Yuma. The Border Patrol declined to prosecute, turning the drugs over to the sheriff’s office.

No charges were brought by the county because the woman was a legal medical marijuana user in California and the Arizona Medical Marijuana Act specifically recognizes laws of other states. But Yuma County Sheriff Leon Wilmot refused to return her drugs, contending that would put him in violation of federal law.

The Court of Appeals ordered Wilmot to hand the drugs over, saying he could not be prosecuted under federal law. Both the Arizona Supreme Court and U.S. Supreme Court refused to disturb that ruling.