SAN FRANCISCO — Gun control advocates in California will get a second chance to make their case that a Bay Area county ordinance restricting where firearms stores can be located does not violate the Second Amendment.

In an order Tuesday, the U.S. Court of Appeals for the Ninth Circuit granted en banc review in Teixeira v. County of Alameda County. A split panel in May sided with opponents of the ordinance finding that officials had not sufficiently justified a 1998 regulation prohibiting the sale of firearms within 500 feet of a residentially zoned area.

Proponents of the measure say the restriction fits squarely within the confines of the U.S. Supreme Court’s landmark gun rights ruling in District of Columbia v. Heller, and that the Ninth Circuit’s May opinion unfairly requires governments to justify limits on gun sales that they argue are “presumptively lawful” under that precedent.

“The outcome here could affect whether dozens of other city, county, and state laws are going to be subjected to grueling litigation challenges,” said Brian Goldman, a senior associate at Orrick, Herrington & Sutcliffe, who is representing the Alameda County. “We’re glad the court’s going to take a closer look at this.”

The restriction was challenged in 2012 by three individuals who were blocked from opening a gun shop in unincorporated Alameda County.

The plaintiffs, represented by San Jose attorney Donald Kilmer, argue that the ordinance bars the exercise of their Second Amendment rights because there are no parcels within unincorporated Alameda County where a prospective gun shop owner could meet the 500-foot rule.

U.S. District Judge William Orrick III of the Northern District of California dismissed that argument—in part because the county argued there were other gun stores already operating within the county. Goldman on Tuesday said there are 10 firearms retailers in Alameda County.

But the panel chided the judge for being too quick to set aside the constitutional concerns without subjecting the regulation to heightened scrutiny. There should be no “categorical exception from Second Amendment scrutiny for the regulation of gun stores,” Circuit Judge Diarmuid O’Scannlain wrote, joined by Judge Carlos Bea. Judge Barry Silverman dissented, calling the suit “a mundane zoning dispute dressed up as a Second Amendment challenge.”

The case has become a lightning rod for both gun rights advocates and those who favor stronger gun controls. In an amicus brief for the plaintiffs, the Citizens Committee for the Right to Keep and Bear Arms argued against rehearing, drawing a parallel to reproductive rights.

“Suppose the people had ratified constitutional text securing the fundamental right to make a ‘decision whether to bear or beget a child,’ ” its lawyer, Alexandria, Virginia-based Alan Gura, wrote. “ Would this court seriously consider going en banc to hyper-textually exclude from the right’s protection all commerce—contraceptive sales, abortion clinics, etc.—enabling its exercise?”

On the other side, the Law Center to Prevent Gun Violence and Youth Alive argue that the measure is both lawful and necessary to curb what it says are “unacceptably high levels of gun violence” in the county, which encompasses Oakland, Berkeley and other East Bay cities. Between 2012 and 2014, it had the second-highest firearm related death rate in California for counties populated by more than 1 million people, averaging 145.7 firearm-related homicides per year, they said.

“Gun regulations are effective in reducing gun violence and gun-related deaths,” the groups, represented by Steptoe & Johnson LLP partner Laurie Edelstein, wrote in support of the en banc petition. “Protecting the ability of local governments to enact sensible laws regulating the commercial sale of guns is a matter of increasing urgency, particularly in light of recent firearm tragedies.”