Philadelphia Mayor Jim Kenney seen on March 6, 2020, during a news conference.
CNN  — 

A judge blocked the city of Philadelphia on Monday from enforcing a recent ban on firearms in recreation facilities after a gun rights lobbying group argued state law stipulates gun regulations can only be created on a state level, not by local jurisdictions.

The decision by Judge Joshua Roberts at the Philadelphia Court of Common Pleas is rooted in a state law known as the Uniform Firearms Act, which prohibits local governments from regulating possession of a firearm.

In his opinion, Roberts explains that because Philadelphia remains “a creation of the state,” it does not have the authority to implement laws in opposition to state laws.

The seven-page opinion points to a 1996 state Supreme Court case which determined the state legislature has barred local municipalities from regulating the “ownership, possession, transfer or transportation of firearms,” Roberts wrote.

The ruling comes after Philadelphia Mayor James Kenney and Department of Parks and Recreation Commissioner Kathryn Ott Lovell signed an executive order last week prohibiting people from carrying firearms and other deadly weapons on city-operated recreation premises, including courts, playgrounds, recreation centers and pools, with some exceptions.

The order was signed a day after Kenney attended the funeral of Tiffany Fletcher, an employee of the Mill Creek Recreation Center in West Philadelphia who was shot and killed while working, city officials said. A 14-year-old boy has been charged with murder in connection with the shooting.

In response to the order, Gun Owners of America, its associated foundation and four Pennsylvania residents filed a request asking the court for a permanent injunction to stop its enforcement.

“Pennsylvania law is ‘crystal clear’: regulation of firearms is a matter of statewide concern, and must be undertaken by General Assembly,” the amended complaint filed Monday said. “Mayor James Kenney is not permitted to regulate firearms by executive fiat, as he attempts here.”

Sarah Peterson, a spokesperson for the city, told CNN that officials are “disappointed by the outcome, which as it stands prevents City employees from making the reasonable request that anyone with a firearm or deadly weapon leave a recreation facility.”

“Since 2019, nearly 300 reported incidents of gun violence have occurred at City recreation facilities, in addition to dozens of other incidents of violence with a deadly weapon,” Peterson said in an email. “The Mayor’s Executive Order was intended to prevent the senseless violence that is interfering with the safety of children, families and staff in what must be safe places.”

The city is reviewing the judge’s decision and has not said whether it will appeal the ruling, Peterson added.

Val Finnell, Pennsylvania director of Gun Owners of America, said in a news release that the organization is sending a message to other local leaders across the state that it will “not tolerate illegal bans, prohibitions, or restrictions on the Second Amendment” in violation of state law.

“We stopped Mayor Kenney in less than a week, and we will do the same to you,” he said.

CNN’s Rob Frehse contributed to this report.