SAN FRANCISCO — The Ninth Circuit Court of Appeals in a ruling Tuesday dismissed a challenge to an Alameda County ordinance that prohibits gun stores within 500 feet of schools, liquor stores and residential neighborhoods.

The case originated over the county refusing to give a permit to a businessman who wanted to open a gun store in San Lorenzo, and challenged the county’s right to regulate where guns can be sold, saying the decision could have national implications.

Lead plaintiff John Teixeira, along with Second Amendment advocates, had argued in a 2012 lawsuit that the county’s 1998 ordinance violated their constitutional rights. Teixeira had applied to open a gun store on Lewelling Boulevard in San Lorenzo but was denied after the location fell within 500 feet of two residential neighborhoods, in violation of the county ordinance.

The issue divided the courts. A U.S. District court upheld the ordinance, but in 2016 a three-justice panel within the Ninth Circuit found that it violated the Second Amendment. An 11-justice panel, which only hears a small percentage of cases, ruled on Tuesday to uphold the ordinance. The case was argued in court on March 22.

Attorney Brian Goldman, who represented Alameda County, called the ruling “significant in reaffirming the authority of local communities to issue common-sense regulations on where gun sales can take place.” Goldman said the panel’s opinion was in line with a prior U.S. Supreme Court decision that recognized individual rights but did not question regulations of commercial sales of firearms.

Receive our Wine Country Fires breaking alerts and latest news updates in your inbox. Sign Up

“The real importance of the court’s decision was to say the Second Amendment protects the right of individuals to keep and bear arms,” Goldman said. “But that doesn’t mean a specific seller has the right to … sell guns in the location of its choosing without regard to local zoning laws.”

Goldman noted that multiple gun stores already operate within Alameda County.

Donald Kilmer, an attorney for the plaintiffs, said he was “disappointed” with Tuesday’s decision. Kilmer referenced the dissenting opinion of U.S. District Judge Carlos T. Bea, who said the county did not present any evidence that locating a gun store at that specific location “creates any risk to residents.” Employees, employers and gun purchasers are all subject to background checks, Bea wrote.

“By definition our customers and employees and owners of the business all have to be law abiding citizens,” Kilmer said. “You can’t say the same for a tattoo parlor or an adult bookstore.”

Kilmer said he would have to check with his client to see if Teixeira will ask the U.S. Supreme Court to hear the case. The attorney said it will also be up to the other plaintiffs in the case, which include Second Amendment advocates Calguns Foundation Inc., Second Amendment Foundation Inc. and the California Association of Federal Firearms Licensees.

Goldman said he doubts the Supreme Court would take up the matter since there are no differing conclusions at the appellate level.

“There’s no other court of appeals that has considered this type of zoning regulations on where gun stores can operate,” Goldman said.