PHOENIX — Being drunk in public is not a crime, no matter what local officials may conclude, the Arizona Court of Appeals ruled Tuesday.

In a unanimous decision, the judges barred Scottsdale from enforcing its ordinance making it illegal for someone to be in public while "under the influence of alcohol'' or other drugs. The judges said that runs afoul of a conscious decision by the Legislature to treat alcoholism as a disease and not a crime.

And the judges said it did not matter that the Scottsdale ordinance applied only "when it reasonably appears that he may endanger himself or other persons or property.''

Scottsdale City Attorney Bruce Washburn said his office is studying the ruling and has not decided whether to seek Supreme Court review. But Washburn said that he is instructing police to immediately stop enforcement.

Monday's ruling is legally binding on trial courts throughout the state.

The case stems from the 2011 arrest of David Coles and his being charged for being "incapacitated by alcohol in public.''

A city magistrate threw out the charge as pre-empted by state law, a ruling that was reversed by Maricopa County Superior Court Judge Crane McClennen.

But appellate judge Kent Cattani, writing for the court, said that ignores a 1972 state law which decriminalized the whole concept of being drunk in public. The only exceptions were people engaged in specific activities, like driving vehicles or operating machinery.

And Cattani said that same law also set up treatment programs and services for those who voluntarily seek help.

More to the point, lawmakers also specifically precluded any local law that makes being drunk in public a crime by itself or any element of any other crime.

Cattani said the Arizona law came after years of discussion of whether alcoholism should be treated like a disease. That included some U.S. Supreme Court rulings questioning whether someone who has a disease, including an addiction, can be charged with a crime.

The appellate judges also rejected arguments by city prosecutors that the ordinance does not make being drunk in public, by itself a crime, but only applies when that person also is endangering self or others. Cattani said allowing that exception to stand would essentially make the preemption legally meaningless.

"Almost anyone who is under the influence of alcohol in a public place arguably presents a danger to himself or others,'' the judge wrote. And Cattani pointed out that the 1972 change in Arizona law eliminated criminal liability for public drunkenness "even where it reasonably appears the person may endanger himself or other persons or property.''