Arizona’s medical marijuana law is constitutional and federal drug laws don’t stand in the way of public officials implementing the state law, a judge ruled Tuesday.

“This court will not rule that Arizona, having sided with the ever-growing minority of states and having limited it to medical use, has violated public policy,” Judge Michael Gordon of Maricopa County Superior Court wrote.

The case started over a dispute whether Maricopa County had to approve zoning for a dispensary in Sun City. It grew to include the larger legal question of whether federal drug laws pre-empt Arizona’s medical marijuana law.

Under Gordon’s ruling, county officials must provide the White Mountain Health Center with documentation that it complies with local zoning restrictions.

During an Oct. 19 hearing, attorneys for the American Civil Liberties Union and its Arizona affiliate argued that the Arizona law is not pre-empted by federal drug laws. They said the state is allowed to make policy decisions on medical marijuana.

Lawyers for the state Attorney General’s Office and Maricopa County argued that the state’s medical marijuana law cannot be fully implemented because federal drug laws make it a crime to possess, grow or distribute marijuana and because federal laws are considered supreme over state statutes.

Arizona allows use of medical marijuana for such conditions as cancer, chronic pain and muscle spasms.

Arizona health officials have started licensing the first dispensaries in the state, and the first one is expected to open with days. More than 30,000 people already have cards authorizing them to possess and use medical marijuana.

Most of those people also had authorizations to grow marijuana, but those authorizations get phased out once a dispensary is licensed in their area and once their card with current growing authorizing comes up for renewal annually.

County Attorney Bill Montgomery told Gordon during the Oct. 19 hearing that county employees could face prosecution by the federal government for aiding and abetting drug crimes if the dispensaries open, while ACLU attorney Ezekiel Edwards said government workers really aren’t at risk of prosecution.

White Mountain Health Center sued the county after it rejected the facility’s registration certificate, which is part of the state requirement to become a medical-marijuana dispensary applicant.

The case took on broader focus when Montgomery and Attorney General Tom Horne made separate but coordinated requests in the court case, specifically targeting the Arizona law’s dispensary provisions.

Gordon had already ruled that state health officials could not decline to award a dispensary license to White Mountain because of the county’s inaction, but Horne and Montgomery asked the judge to dismiss White Mountain’s lawsuit on grounds that Arizona’s law is illegal.

Horne and Republican Gov. Jan Brewer previously asked a federal judge to rule on whether Arizona’s law is pre-empted. However, the judge refused, ruling in January that the state officials hadn’t established a genuine threat of prosecution of state employees for administering the law.

Also last January, a state trial judge ordered the state to proceed with allowing creation of dispensaries and lifted some of the state’s restrictions.

The state has issued use and growing permits to thousands of individuals, but Brewer for months balked at implementing the dispensary part of the law.