Two police officers were shot and hospitalised on Monday evening during a Fourth of July fireworks show in Philadelphia, sparking a stampede of fleeing attendees.

Following the deadly mass shooting at an Independence Day parade in Chicago in which six people were killed and dozens were left injured, two police officers were shot and injured in front of the Philadelphia Art Museum while they were on duty at the Fourth of July festivities in the historic city.

Both officers sustained minor injuries and have since been released from the hospital, the Philadelphia Inquirer reported.

One officer suffered a graze wound to the shoulder, while the other officer suffered a similar would to his forehead, with the bullet being found in his hat.

At a press conference outside of Thomas Jefferson University Hospital, Philidelphia Police Commissioner Danielle Outlaw said: “It is miraculous, the fact that the round stopped in his hat… It initially went up inside, hit his forehead, and then the round stopped in his hat.”

“We’re all just extremely grateful that this wasn’t worse than what it was,” she added.

Outlaw said that there have currently been no arrests and no suspects have been detained as of 12:30 am Tuesday morning. It is also unclear whether the officers were deliberately targetted or if it was the result of stray gunfire.

The shooting, which occurred around 10 pm, resulted in a stampede of people attempting to flee the Benjamin Franklin Parkway where they had gathered to watch the fireworks display above the Art Museum. The shooting followed a free concert in the city, featuring R&B singer Jason Derulo.

Chaotic footage posted on social media showed hundreds of people fleeing from the shooting as fireworks continued to blast off in the background. It has not been reported that there were any injuries as a result of the stampede.

Criticising the Supreme Court for striking down a New York law that placed limits on carrying guns in public, Philidephiphia Mayor Jim Kenney said: “The weather was beautiful, the concert was beautiful, but we live in America and we have the Second Amendment and we have the Supreme Court of the United States telling everybody they can carry a gun wherever they want.”

“We have to come to grips with what this country is about right now. We had a beautiful day out there today except for some nitwit … who has a gun and probably shouldn’t have had it.”

The shootings in Philadelphia followed a deadly attack in Chicago earlier in the day when six people were shot and killed and a further 24 people were injured. Police have arrested Robert E. Crimo III in connection to the shooting.

Follow Kurt Zindulka on Twitter here @KurtZindulka