In a big victory for Pittsburgh Mayor Bill Peduto and other state and local politicians, a state court Thursday threw out a law that aided the National Rifle Association in challenging local gun ordinances in court.

The Commonwealth Court of Pennsylvania, an appellate court, ruled that the Republican-controlled legislature used an unconstitutional procedure to get the law enacted in the final days of last year’s session.

Here’s the court’s decision explained by the AP:

The gun provision was merged with a bill whose intent was to establish criminal penalties for theft of secondary metals, such as wires or cables. The judges said that process violated constitutional requirements that bills may not be altered to change their original purpose and must be confined to one subject.

The ousted law, Act 192, would have allowed gun owners to challenge an ordinance without having to show they were harmed by it, and let the membership organizations such as the NRA sue on behalf of a member and recover damages if the challenge went in their favor.

Peduto said in a statement that he was “overjoyed” that the state court system sided with citizens and public safety “instead of special rights for the gun lobby.”

“This law was clearly unconstitutional from the outset, and designed to threaten Pittsburgh and other cities trying to protect their neighborhoods from illegal guns,” Peduto said.

The ruling sends “a very strong message to the General Assembly that the old way of doing business just isn’t acceptable anymore,” Mark McDonald, press secretary to Philadelphia Mayor Michael Nutter, told the AP. “The law requires and the public expects transparency, deliberation and public debate.”

Reach Natasha Khan at 412-315-0261 or nkhan@publicsource.org. Follow her on Twitter @khantasha.

This story was made possible by donations to our independent, nonprofit newsroom.

Can you help us keep going with a gift?

We’re Pittsburgh’s Public Source. Since 2011, we’ve taken pride in serving our community by delivering accurate, timely, and impactful journalism — without paywalls. We believe that everyone deserves access to information about local decisions and events that affect them.

But it takes a lot of resources to produce this reporting, from compensating our staff, to the technology that brings it to you, to fact-checking every line, and much more. Reader support is crucial to our ability to keep doing this work.

If you learned something new from this story, consider supporting us with a donation today. Your donation helps ensure that everyone in Allegheny County can stay informed about issues that impact their lives. Thank you for your support!

Natasha is director of audience & visuals strategy at Pittsburgh's Public Source. She runs the organization's audience and visual team. She manages social media, the website, brand strategy and works...