(Reuters) - Pittsburgh’s city council on Tuesday approved restrictions on the use of some “assault weapons” and ammunition, passing bills introduced following a 2018 synagogue shooting, in a move gun-rights activists vowed to challenge.

FILE PHOTO: AR-15 rifles are displayed for sale at the Guntoberfest gun show in Oaks, Pennsylvania, U.S., October 6, 2017. REUTERS/Joshua Roberts - RC120D41AB00/File Photo

The all-Democratic council voted 6-3 to restrict the use of certain semi-automatic weapons, such as the Colt AR-15 rifle, which a lone gunman used in the October shooting at the Tree of Life Synagogue which killed 11 people.

City residents who already own such guns would be allowed to keep them. The legislation bans certain ammunition and gun accessories.

It also lets authorities temporarily take firearms from people judged a risk to themselves or others.

Pittsburgh Mayor Bill Peduto, a Democrat, said he would sign the bill into law.

Opponents of the legislation said it violated a state law prohibiting municipalities from regulating firearms or ammunition and vowed to sue the city and file criminal complaints against the council and mayor.

“If you sign between now and COB Thursday, we’ll be at Municipal Court to file private criminal complaints,” tweeted Val Finnell, a leading critic of the legislation.

Councilman Corey O’Connor said Pennsylvania courts were now more open to allowing municipalities have a say on protecting residents. In 1993, the state courts overturned a previous assault weapons ban by the city council.

“It’s going to be a difficult battle, but we’re willing to fight it,” O’Connor told reporters after the vote.

Seven U.S. states prohibit assault weapons, but Pennsylvania is not among them. Certain U.S. cities and counties in U.S. states with no assault weapon bans have imposed their own restrictions on the firearms.

Pittsburgh council members who voted against the legislation said it would be too costly to litigate given Pennsylvania law.

Gun control groups like CeaseFirePA praised the legislation as “common-sense gun laws.”

“Municipalities like Pittsburgh deserve the right to protect their communities,” CeaseFirePA tweeted following the vote.