Allegheny County Judge Joseph James ruled Tuesday that the gun ordinances violate a state law that prohibits individual municipalities from regulating the ownership or possession of guns or ammunition.
Pittsburgh Mayor William Peduto said the city would appeal the ruling. The city is being represented pro bono by attorneys from Everytown for Gun Safety, an organization that advocates against gun violence, the Pittsburgh Tribune-Review reported.
Three organizations challenged the legislation. Firearm Owners Against Crime, Firearm Policy Coalition Inc. and Firearm Policy Foundation were joined by three private individuals.
The ordinances passed in April ban the possession and use of certain semiautomatic weapons, including assault rifles. The Tree of Life gunman used an AR-15 assault-style rifle in the October 2018 attack that killed 11 worshippers on a Shabbat morning.
The measures also ban ammunition and accessories, such as large capacity magazines, and allow courts to temporarily remove guns from a person deemed to be a public threat. A companion bill passed by the council directed additional funding to city anti-violence programs.
City residents who own guns and accessories outlined in the bills would be grandfathered. Violators of the laws could be fined $1,000 or face up to 90 days in prison for each offense.