Gun rights groups sued Tuesday to block Pittsburgh from enforcing firearms legislation passed after a mass shooting at a synagogue, accusing city officials of blatantly defying the state's prohibition on municipal gun regulation.

Democratic Mayor Bill Peduto signed the bills into law in a ceremony at the City-County Building, declaring the community had come together "to say enough is enough." City officials said they had to act because the Republican-controlled Pennsylvania Legislature — which is planning to hold a memorial service for the victims this week — will not.

"We are going to take some action, we are going to do something positive and, yes, it is going to be everlasting," said Peduto, surrounded by gun-control advocates and members of three congregations that were targeted in the shooting rampage at Tree of Life Synagogue. "Change only happens when you challenge the status quo."

Minutes later, a coalition of gun rights groups sued to get the newly minted laws overturned, calling them "patently unenforceable, unconstitutional, illegal." Shortly after that, a second lawsuit, this one backed by the National Rifle Association, declared that "Pittsburgh has violated the rights of its citizens."

"Worse yet, Pittsburgh has committed this violation without any realistic prospect of diminishing the ... incidence of horrific mass shootings," said the suit, filed by four city residents. "All it will do is leave law-abiding citizens more vulnerable to attack from better-armed and more ruthless assailants."

The new legislation restricts military-style assault weapons like the AR-15 rifle authorities say was used in the Oct. 27 massacre that killed 11 and wounded seven. It also bans most uses of armor-piercing ammunition and high-capacity magazines and allows the temporary seizure of guns from people who are determined to be a danger to themselves or others. The first two laws are due to take effect in 60 days, the imminent-danger law in 180 days.

Whether the city will be able to enforce them is an open question. State law has long prohibited municipalities from regulating the ownership or possession of guns or ammunition, and courts have thrown out other local firearms measures, including a 1990s-era assault weapons ban in Pittsburgh.

But city leaders said they were eager to take on the fight, given the Legislature's traditional reluctance to pass gun legislation.

"This fantasy that somehow the state is going to step up and help us is simply not going to happen," said Council President Bruce Kraus.

The bill signing took place as state lawmakers prepared to come together for a memorial service for the Tree of Life victims. The unusual joint session at the Capitol in Harrisburg on Wednesday will bring together the House and Senate for prayers and speeches about the attack. Peduto's spokesman said the timing was coincidental.

The Pittsburgh bills — proposed not long after the deadliest attack on Jews in U.S. history — were weakened ahead of City Council passage in an effort to make them more likely to survive a court challenge. While one of the bills originally included an outright ban on assault weapons, the revised measure bars the "use" of assault weapons in public places.

A full ban on possession would take effect only if state lawmakers or the state Supreme Court give municipalities the right to regulate guns, which is seen as unlikely in a state where a majority of legislators are fiercely protective of gun rights.

The city will be represented in court by lawyers with Everytown for Gun Safety, a group backed by billionaire Michael Bloomberg.

In another legal filing Tuesday, the Allegheny County Sportsmen's League asked a judge to hold the city, Peduto and six council members who voted for the gun-control legislation in contempt of court, contending they violated a 1995 legal settlement in which city officials dropped the earlier effort to ban assault weapons and agreed to "abide by and adhere to Pennsylvania law."

"It is unfortunate that ... taxpayers will be burdened by the city's elected officials believing it is acceptable — and even gloating — that they are violating the Pennsylvania Constitution and Crimes Code," Joshua Prince, a lawyer seeking to overturn the laws, wrote in a statement.

___

Rubinkam reported from northeastern Pennsylvania.