HARRISBURG, Pa. (KDKA/AP) – A state appellate court is striking down a Pennsylvania law designed to make it easier for gun-rights advocates to dismantle local gun ordinances.

Commonwealth Court ruled Thursday that the procedure lawmakers used last year to enact the law ran afoul of the state constitution.

READ MORE: Pittsburgh Weather: Approaching Cold Front Prompts Tornado Watch, Tornado Warning As Season Changes To Fall

Under the law, gun owners no longer had to show they were harmed by an ordinance in order to challenge it, and it let “membership organizations” like the National Rifle Association sue on behalf of any Pennsylvania member.

The provision was merged late in last year’s legislative session with a bill whose intent was to establish criminal penalties for secondary metals.

The judges say it violated constitutional requirements that bills can’t be altered to change their original purpose and must be confined to a single subject.

READ MORE: Couple Arrested In Westmoreland County Facing Charges In Disappearance And Death Of 3-Year-Old

Mayor Bill Peduto also commented on the ruling Thursday, saying:

“This law was clearly unconstitutional from the outset, and designed to threaten Pittsburgh and other cities trying to protect their neighborhoods from illegal guns. I’m overjoyed that the court system is joining us in standing up for citizens and public safety instead of special rights for the gun lobby.”

Join The Conversation On The KDKA Facebook Page
Stay Up To Date, Follow KDKA On Twitter

MORE NEWS: Program In Pittsburgh Looks To Give Young People A Second Chance

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)