As the state Legislature stalls on gun control, there seems to be no shortage of local officials who want to pass gun control laws at the municipal level.

But there’s also no shortage of deep-pocketed special interest groups who are ready to fight them.

Local efforts to pass gun control legislation have all but dried up in recent years, experts say, in the face of costly legal battles from Second Amendment advocates.

Shira Goodman of the pro-gun control group CeaseFirePA told the Capital-Star that her organization used to work frequently with municipalities across Pennsylvania that wanted to regulate firearms.

Even as anxiety over gun violence has increased, and as local police forces bear the brunt of gun crimes and illegal firearm trades, local officials have tapped the brakes on gun control for fear of being sued, she said.

Read More: Harrisburg Police herald recovery of more than 600 illegal firearms.

“City officials are frustrated,” Goodman said. “We get calls all the time from municipalities who would like to regulate guns in municipal buildings … and I talk to mayors and city council people all the time who would like more authority to do it.”

Pennsylvania’s state Constitution says only the General Assembly can regulate the sale, transfer, and use of firearms. For a long time, that didn’t stop local governments from adopting their own gun ordinances.

Throughout the 1900s, local governments across Pennsylvania adopted laws regulating the possession of firearms by minors or the use of guns in public places.

These laws went more or less unchallenged for decades.

That changed in 2014, when the Legislature passed a law allowing any gun owner to file a challenge to a local ordinance, regardless of whether they had been personally harmed by it.

The new statute opened all municipal firearm laws in Pennsylvania to legal challenges. It led dozens of local governments to repeal their ordinances. Most have not been reinstated.

“The financial burden it placed on municipalities was created a substantial disincentive to defend ordinances, even if they believed they were necessary,” Harrisburg attorney Josh Autrey said. “A lot [of municipalities] said, ‘we don’t want to risk it.’”

Four cities — Harrisburg, Lancaster, Pittsburgh and Philadelphia — decided to keep their firearm ordinances in place, knowing they would have to defend them in court.

Harrisburg is still litigating four ordinances that were challenged in 2015. A Commonwealth Court judge will hear oral arguments in the case this April, said Autrey, a lead attorney in the case.

Among the ordinances the city is defending is a measure, passed in 1901, that outlaws guns on public property, including parks and playgrounds.

Autrey said that the ordinances are being challenged on the grounds that the state Constitution preempts municipal action on gun control. But one argument in favor of municipal ordinances, he said, is that cities have rights as property owners to regulate the use of firearms in public.

“Local governments can’t pass local alcohol ordinances, but that doesn’t mean you can’t kick someone who’s drunk out of city hall,” Autrey said. “The same principle would apply to regulating an employee who, say, wants to bring a shotgun strapped to their back to an office job. There has got to be practical abilities to regulate employees in public spaces.”

CeaseFirePA’s Goodman said that a November shooting at a municipal building in Paradise Township, in Monroe County, rattled local officials who want to prohibit guns on public property. State law prohibits firearms in courthouses, Goodman said, but doesn’t regulate their use in other public spaces.

Goodman understands that state statues on firearm regulation preempt action at the local level. But if state lawmakers won’t exercise their right to regulate guns, Goodman said, local authorities should assume that power instead.

“There’s some obligation on a state that preempts action in a field to actually regulate that field,” Goodman said. “I think there’s a good question to be asked right now about how legislators are using preemption.”

She hopes that hotly debated gun-control measures now before Pittsburgh’s City Council could turn the tide for municipal firearm laws across the state.

In the wake of last October’s Tree of Life Synagogue mass shooting that killed 11 people, Pittsburgh “reached a tipping point,” Pittsburgh City Councilwoman Erika Strassburger said. Following that October day, the city could no longer let itself be hamstrung by state law.

On the fifth anniversary of the Sandy Hook shootings in Newtown, Conn., Strassburger and fellow Councilman Corey O’Connor — who both represent Squirrel Hill, the city’s Jewish neighborhood — introduced three bills: an assault weapons ban, a ban on extended magazines and bump stocks, and an extreme risk protection law.

“We’re not the state, we’re not the federal government. You could step out of the city pretty easily and there would be different laws that apply to you,” Strassburger said.

But passing laws to prevent violence, whether a mass shooting or a suicide, would still be worthwhile, Strassburger added.

She’s also hopeful that the laws could inspire other cities, both in Pennsylvania and across the country, to build a grassroots movement of municipalities to expand gun control laws.

Duquesne, a small borough outside Pittsburgh, has already expressed interest, O’Connor said.

Kim Stolfer, president of the gun rights group Firearms Owners Against Crime, has battled with Pittsburgh before over an assault weapons ban it passed in the ‘90s.

He’s already on the front lines of this new fight: Stolfer has said he plans to sue if the laws pass. He argues that it is illegal for local governments to even pass firearm laws under the state Constitution. Passing a local gun control ordinance that violates the Constitution is a misdemeanor offense in itself, he said.

Allegheny County’s Democratic District Attorney Stephen Zappala cited the same statute in a letter to O’Connor. While making no comment on the merits of the gun push, Zappala’s note said that the “legislative effort needs to come from the General Assembly.”

Both Zappala and state Rep. Dan Frankel, the Allegheny County Democrat whose district includes Tree of Life, took to Twitter to push instead for a solution from Harrisburg, not Pittsburgh.

The District Attorney is right– currently Pittsburgh cannot legally create the legislation our citizens want. This underlines the need for the state House and Senate to consider my bill, to empower local gvts to make local decisions about gun safety.https://t.co/zqqZfkYPXl — Dan Frankel (@RepDanFrankel) January 15, 2019

The way to properly effect change on this issue, is to lobby the state and get overwhelming support for Rep. Dan Frankel's effort to undue the state law, eliminate this big government effort to control local municipalities and give them the freedom to self govern. — Steve Zappala (@SteveZappala) January 22, 2019

Even though the city racked up massive legal fees fighting gun rights groups earlier this decade, Pittsburgh’s O’Connor said they’ve already had lawyers offer to work pro bono on the inevitable legal challenge against the new laws.

“The goal is to not expend city tax revenue on this,” he said. “We’re all willing to have the fight because we believe it’s the right thing.”

Stolfer countered that he plans to file complaints against lawyers who offer to defend the city, saying they are aiding and abetting crime by trying to violate the state Constitution.

Even if the relationship between Stolfer and the city is anything but harmonious, they can agree on one thing.

“I think everyone is watching,” Stolfer said.