The House on Tuesday voted overwhelmingly on a measure that would give the NRA standing to sue municipalties that enact their own gun laws and subject them to paying the cost of legal fees in a successful challenge.

The measure - approved on a preliminary vote of 143-54 after lengthy debate - stems from a legal battle in Philadelphia between the city and the NRA which sued over gun control laws that were more restrictive than state law.. The courts struck down several of the ordinances but upheld others, including mandatory reporting of lost and stolen weapons.

The amendment was added to a bill to require transfer of mental health records from the state to the federal database. A final vote is expected today..

About 30 other municipalities, including Harrisburg, York, Lancaster, Abington and Norristown, have enacted similar laws.

The amendment sponsored by Rep. Mark Keller (R., Perry) also would grant legal standing to "membership organizations," including the NRA.

Southeast Democrats spoke against the bill, saying it was driven by the gun lobby and arguing conditions in urban areas are much different from rural sections of the state.

"It aims to strip away rights of municipalities to protect themselves and bankrupt them if they try," said Rep. Steve McCarter (D., Montgomery). "It's a power grab to empower gun lobby. Our local governments deserve right to protect citizens."

"Where I come from bad people have guns. People who have guns hurt you," said Rep. Mike O'Brien (D., Phila.). "One size (in Pennsylvania's gun laws) does not fit all."

Bill supporter Rep. Jeff Pyle (R., Armstrong) said the state can't have a "crazy quilt" of gun laws where Philadelphia and other communities are "just doing what they want."

Philadelphia District Attorney Seth Williams through a spokeswoman declined to comment. Mayor Nutter said he not yet had time to review the bill.

The NRA sent out an email to supporters last night highlighting the passage of a measure as "strengthening firearm preemption to provide consistency for Pennsylvania's firearm and ammunition laws throughout the state",

It also noted the failure of an "anti-gun" amendment by Rep. Steve Santarsiero (D., Bucks) that would have expanded universal background checks to all firearms purchases -- including rifles and shotguns

Click here for Philly.com's politics page.