HARRISBURG - Lawmakers cast key votes Monday on two controversial bills involving guns and sanctuary cities, as the Republican-controlled legislature returned to the state Capitol for a dizzying six days of votes before the end of its two-year session.

The Senate, largely along party lines, approved a bill that would allow gun enthusiasts, as well as the National Rifle Association and other membership groups, to sue municipalities such as Philadelphia and Pittsburgh that have enacted stricter gun laws than those on state books.

Across the hall, the House approved a bill that would penalize Philadelphia for its "sanctuary city" status.

Both measures need another round of legislative approvals before they go to Gov. Wolf for veto or signature.

Nonetheless, both provoked impassioned debate Monday.

In the Senate, Sen. Daylin Leach (D., Montgomery) contended that the gun bill "shows the complete subservience of this body to the NRA." He said that under the legislation, organizations that aren't based in Pennsylvania could sue a municipality and recover legal expenses, leaving local residents on the hook to foot the bill. The legislation states that those who would have standing to sue include organizations to which a Pennsylvania resident belongs.

"The fact that we are willing to sell out our own citizens to the NRA shows how much command . . . the NRA has over this body," he said.

Supporters believe it is necessary to bring a measure of consistency to local gun ordinances that may vary widely from one municipality to the next.

Similar legislation became law in 2014, but was later overturned by Commonwealth Court because of the way it passed the legislature - it had been tacked onto an unrelated bill that dealt with the theft of metals. The state Supreme Court declined to reinstate it.

The bill now heads to the House. Wolf, a Democrat, has said he would veto it.

In the House, members voted, 136-55, to impose sanctions on so-called sanctuary municipalities that restrict employees from certain actions, such as communicating with federal immigration officials about a person's immigration status.

Philadelphia and more than 30 Pennsylvania counties have policies, written and unwritten, of declining to honor requests by Immigration and Customs Enforcement, called detainers, to hold a person suspected of violating immigration laws, according to a March 2015 report from the Temple University law school.

Several Democrats spoke against the proposal.

"If I were to speak my language, which is Spanish, and because you can't understand it, is it probable cause that I may be an illegal alien?" asked Rep. Angel Cruz (D., Phila.). No, said the bill's sponsor, Rep. Martina White (R., Phila.).

Rep. Daryl Metcalfe (R., Butler) defended the proposal.

"Pennsylvanians don't support illegal aliens taking American jobs," he said.

Wolf spokesman Jeff Sheridan said the governor has concerns about the sanctuary city measure, but stopped short of saying whether he would veto it.

Separately, the Senate this week is expected to debate another controversial measure sponsored by White that would prohibit public officials from releasing the name of police officers involved in shootings that result in death or "serious bodily injury." They could only do so legally 30 days after the shooting, or once an official investigation into the shooting has concluded, according to the bill.

Anyone who violates the gag could be charged with a second-degree misdemeanor. The state Attorney General's Office and a district attorney's office would be exempt.

Sheridan said the governor was reviewing the legislation.

Also this week, the Senate could take up a bill that would reinstate mandatory minimum sentences for various crimes - such as selling drugs to minors and crimes against the elderly - after a U.S. Supreme Court decision struck them down. The House passed the measure in a 146-46 vote Monday.

717-787-5934 @AngelasInk