One of the two police officers shot during Fourth of July celebrations in Philadelphia, Pennsylvania, survived miraculously after his hat stopped a bullet in its tracks.

The incident took place around 10pm local time near the Parkway Welcome America Festival, when the two unnamed officers, a 36-year-old from the Philadelphia Police Highway Patrol, and a 44-year-old from the Montgomery County Bomb Unit, were shot by an unknown suspect, triggering panicked reactions among those attending the celebrations.

Also read | In 185 days of this year, 309 mass shootings in United States

At the time, it had been reported that both officers had been transferred to the Jefferson University Hospital for treatment, but there were no details available barring the fact that a bullet had grazed one officer’s head, and that the other had been shot in the shoulder.

Now, photos shared with Fox 29 by Fraternal Order of Police Lodge 5 boss John McNesby have revealed how the Highway Patrol officer survived.

Also read | Highland Park shooting: How pro-gun lobbies celebrated July 4 amid crisis

The photos show a bullet lodged in the officer’s cap, with blood from the resultant injury smeared on a memorial card for a Philadelphia police chaplain who died recently.

“It is miraculous the fact that the round stopped in his hat. I think initially it went up the inside and hit his forehead and then the round stopped in his hat,” Fox 29 quoted Philadelphia Police Department Commissioner Danielle Outlaw as saying.

Also read | Highland Park shooting: How suspect Robert ‘Bobby’ Crimo was taken into custody

The two officers, who were stabilised upon admission to the Jefferson University Hospital, have also been released, and are reportedly doing well, all things considered.

However, police have yet to identify a suspect, and no arrests have been made thus far. An investigation into the incident is currently underway and further details are expected as more information comes in.