A tense video has emerged showing a panicked crowd fleeing the scene of a Fourth of July celebration in Philadelphia, Pennsylvania, where two police officers were shot. 

The officers, a 36-year-old Philadelphia Police Highway Patrol officer and a 44-year-old member of the Montgomery County Bomb Unit, have been released from hospitals after being injured in the gunfire that erupted shortly before 10 p.m. at the Wawa Welcome America Festival. 

Footage taken from the scene shows people climbing over barriers while fireworks are going off in the background. 

One of the officers wounded in the shooting found the bullet still lodged in his hat and was taken to Jefferson University Hospital. 

PHILADELPHIA OFFICERS SHOT: BULLET FOUND LODGED IN SIDE OF COP’S HAT 

Philadelphia, Pennsylvania Fourth of July shooting

Crowds are seen fleeing the area on Monday, July 4 after shots rang out at a Fourth of July celebration in Philadelphia, Pennsylvania. (Credit: @franssiiss/Local News X/TMX)

"It is miraculous the fact that the round stopped in his hat," Philadelphia Police Department Commissioner Danielle Outlaw said. "I think initially it went up the inside and hit his forehead and then the round stopped in his hat." 

Philadelphia Fourth of July officer shot

A photo shows a bullet lodged in the blood stained hat worn by a Philadelphia police officer who was shot in the head on July 4.  (John McNesby/Chris O'Connell/Fox 29)

The other officer, who was shot in the right shoulder, was transported to the same hospital. 

CLICK HERE TO GET THE FOX NEWS APP 

Videos taken at the scene showed a large police presence directing people away from the area where the shooting took place. 

Authorities have not yet arrested a suspect and no persons of interest have been identified. 

Fox News’ Lawrence Richard contributed to this report.