A Missouri judge upheld a gun ban at the St. Louis Zoo in a ruling issued last week.

St. Louis Circuit Judge Joan Moriarty said the zoo qualifies as a gun-free zone under state law because it serves as both an educational facility — with a preschool and multiple children’s programs serving more than 486,000 students annually — and a gated amusement park.

“The zoo has shown that the safety, patronage and image of the zoo will be compromised if visitors are permitted to carry firearms or other weapons on zoo property, which would significantly harm the level of visitorship, as well as the mission, the public image and autonomy of the zoo as an institution,” Moriarity said in her ruling Friday.

The ruling comes after a two-year battle between the state and Cincinnati-based gun activist Jeffry Smith, who in June 2015 threatened to lead a group of armed protesters into the 90-acre facility in defiance of its signage banning guns.

“That signage, unless it’s backed up by case law or statutory law, is nothing more than the zoo’s attempt to reinforce their biases and to deceive people into not exercising their rights,” he told the St. Louis Post-Dispatch in June 2015. “This is not about protecting oneself from the wildebeests in the zoo. This is about the zoo deceiving people into thinking they don’t have that choice of whether to bring a gun in or leave it in a car.”

Smith’s protest stemmed from a May 2015 incident involving fellow gun rights activist and former security guard, Sam Peyton, 40, of Springfield, Missouri. Peyton said zoo security improperly detained him and questioned him over the empty holster he’d worn for two-and-a-half hours while visiting the zoo with his wife on Memorial Day. He told security he’d left his gun stored in his vehicle, but officers still forced the couple to leave or face police intervention.

“For me to be harassed for an empty holster, that was ridiculous,” Peyton told the newspaper of the incident. “Why was I put out of the zoo for an empty holster? If they can’t explain that, I want an apology.”

Smith ultimately entered the park wearing an empty holster, according to the newspaper.

Smith’s lawyer, Jane Hogan told the newspaper Monday both disagree with the judge’s “overly-broad interpretation” of Missouri’s gun laws and will appeal to a higher court.

“To say that it’s a school or an amusement park, then any McDonald’s that has a playground would be an amusement park because they have rides and sell food,” Hogan said. “The legislature has given us no guidance here. When they say ‘amusement park,’ we don’t know what they mean because they use ‘place of amusement’ in other statutes. So we have to assume they mean something different.”