Harrisburg Mayor Eric Papenfuse said the ruling was "good news" for the gun lobby but "terrible news" for the residents of Harrisburg and the commonwealth.

HARRISBURG, Pa. (AP) — People can sue to challenge a city’s gun restrictions even if they have not been charged with violating them, Pennsylvania’s highest court ruled Wednesday.

A divided state Supreme Court said that Firearm Owners Against Crime and other plaintiffs have legal standing to take on the Harrisburg city gun ordinances. At issue are local laws with criminal penalties for discharging a gun outside a gun range, possessing guns in parks, failing to report lost or stolen guns within two days or unaccompanied children having firearms outside their homes.

READ MORE: Allegheny County's 911 Call Center Losing Dispatchers Who Feel Overworked

The majority opinion in the 4-3 decision said the plaintiffs do not have to wait until they are charged with violating the ordinances before challenging them on constitutional grounds. The decision comes after years of work by Republicans in the state Legislature to prevent local governments from enacting gun laws that are more restrictive than what the state law imposes, and to widen who may sue to overturn such ordinances.

Kim Stolfer, who heads up the firearm owners’ group, said Wednesday he expects the case to return to a lower court where the underlying merits of their case will be decided.

“No citizen should face prosecution for exercising a constitutional right,” Stolfer said. “And that’s essentially what Harrisburg wanted us to go through to be qualified in this action to take on their illegal ordinances.”

Harrisburg Mayor Eric Papenfuse, a defendant along with the city and its police chief, said the lost-and-stolen ordinance has helped city police take on the illegal gun trade, an enforcement effort that removed 153 illegally possessed guns from Harrisburg’s streets this year.

He called the decision a dangerous precedent.

“We absolutely plan to defend our ordinances with all of our might,” Papenfuse said Wednesday. “I think the ruling was good news for lawyers and the gun lobby but terrible news for both the residents of Harrisburg and the residents of the commonwealth.”

The court decision centered on the legal issue of standing, or who is allowed to sue and under which circumstances, under the Pennsylvania Declaratory Judgments Act.

People generally need to show they have been harmed by a law in order to challenge it, but Justice Sallie Mundy outlined several cases in which that standard has been modified to permit lawsuits that put people in the position of complying with a law or giving up their rights.

READ MORE: Last-Second Shot From Virginia's Jayden Gardner Sinks Pitt

Justice David Wecht, voting with the majority, wrote in a concurrence that standing “has evolved” to permit pre-enforcement review of governmental enactments.

“We do not require plaintiffs to violate laws or regulations and subject themselves to sanctions for engaging in protected conduct as the price of admission to the courthouse,” Wecht wrote.

In a dissent, Justice Max Baer said the plaintiffs have not claimed they engaged in conduct prohibited by law or that they intend to.

“Accordingly, I would hold that (they) have failed to establish a substantial, direct and immediate interest sufficient to afford them standing,” Baer wrote.

And Justice Christine Donohue said “mere ownership of a firearm does not establish an immediate or direct interest in the ordinances.”

The city ordinances in question were passed in 1821, 1905, 1951 and, in the case of the lost-and-stolen gun reporting requirement, 2009.

Adam Garber with CeaseFire PA, a group that seeks to reduce gun violence, said the decision will not make the state safer.

“This decision could scare local officials who are searching for innovative and new solutions to a public health crisis that is claiming the lives of their constituents on a daily basis,” Garber said in an email.

Firearm Owners Against Crime is a gun rights group that is regularly involved in lobbying and rallying on related issues in the state Capitol. It claims about 1,600 members. The other two plaintiffs, members of the group, are a Harrisburg resident and a man who works in the city, both concerned they could be prosecuted for violating the ordinances.

MORE NEWS: Know The Score: December 3, 2021

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