HARRISBURG, Pa. (AP) — It is the case that Kevin Brobson cannot get out of his head: the National Rifle Association and gun owners couldn’t get Pennsylvania’s courts to consider their lawsuits challenging firearms restrictions in cities.

Brobson, now running for a seat on Pennsylvania’s Supreme Court, is a key figure in an expanding fight over gun laws that is drawing out in the Legislature, the state’s highest court, and the state’s biggest cities.

READ MORE: Resolution At Pittsburgh City Council Meeting Would Ban Plastic Bags In The City

The fight over gun control is also featuring prominently in the three-way Republican primary race for the state Supreme Court seat, as Brobson and the two other candidates show off endorsements by gun-rights groups, attend the groups’ meetings or point to pro-gun decisions they made from the bench.

The fights in court revolve around a couple of things.

One is a state “pre-emption” law — vigorously protected by the Republican-controlled Legislature — that has long prohibited municipalities from regulating the possession of guns. The other is court precedent that someone must show they were harmed by a municipal firearms ordinance before a judge will consider their legal challenge to it.

Lawsuits are multiplying over the drive-by cities — including Philadelphia, Pittsburgh, and Harrisburg — to write their own firearms laws to try to stem rising gun violence.

“It’s very likely, given the makeup of the Legislature, there are going to be more lawsuits and we need judges who are going to decide lawsuits based on the constitution,” said Kim Stolfer, the co-founder and president of Firearms Owners Against Crime, a gun-rights group based in western Pennsylvania.

Stolfer’s group has given a recommended rating to each of the three Republicans on the ballot in the May 18 primary election: Philadelphia Common Pleas Judge Paula Patrick, Commonwealth Court Judge Patricia McCullough, and Brobson, who is the president judge of the Commonwealth Court.

Asked by a radio interviewer last month if there’s one case that he cannot get out of his head, Brobson raised the National Rifle Association’s lawsuit against Pittsburgh.

“The issue in that case that I had a hard time with was the National Rifle Association and gun owners just couldn’t get in the door of the court and that bothered me greatly,” Brobson said last month on WWDB-AM in suburban Philadelphia.

Court precedent shouldn’t make a law-abiding citizen violate a law in order to challenge it, Brobson said.

Years later, Brobson went on to author a majority decision in 2019 that challenged court precedent and concluded that plaintiffs — in this case, Firearms Owners Against Crime and individual gun owners — could indeed challenge four firearms ordinances in Harrisburg without violating them.

McCullough went farther. In her lone dissent, she concluded that gun owners should also be able to challenge the mayor’s legal powers to shut down gun sales during a declared state of emergency, something the rest of the panel decided against.

READ MORE: Woman In Lawrence County Flown To Hospital After Being Run Over By Her Own Car

The case is before the state Supreme Court now.

In another case, Brobson froze a new state police policy last year requiring a gun store to report a sale of a partially manufactured gun frame, often called 80% receivers or unassembled “ghost guns.”

Philadelphia, along with families of gun violence victims, meanwhile, are in Commonwealth Court challenging the state’s pre-emption law. They accuse lawmakers of preventing cities from saving lives and stoking “the gun violence epidemic” in hard-hit communities.

“It’s a big case and, at the end of the day, it will end up in the state Supreme Court,” said Adam Garber, executive director of CeaseFire Pennsylvania, an anti-gun violence organization. “So the next justice will have something to say about it.”

Before it gets there, Brobson or McCullough could weigh in on it.

As those cases grind on, Brobson, McCullough, and Patrick are making their pitch to Republican voters that they are on the side of gun rights.

Brobson has pulled down a number of firearms-related endorsements, including by the National Rifle Association.

Earlier this month, Brobson told hundreds at a meeting of the conservative Berks County Patriots that he is the “only candidate” who is endorsed by Gun Owners of America.

McCullough and Patrick have each joined a monthly video meeting of Firearms Owners Against Crime, Stolfer said, while Patrick has pointed to her decisions on Philadelphia’s bench throwing out police confiscations of firearms as unlawful.

Her father taught her to shoot at 15, she often says, and told interviewers on WMBS-AM in Uniontown last month that the government “should make no laws restricting our rights as it relates to us carrying weapons.”

“I do believe in our Second Amendment and personally, I do carry myself,” she said. “Of course, I have to: I live in Philly.”

MORE NEWS: 10th Settlement Reached In West Virginia VA Hospital Deaths

(Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)