A firework thrown into a Fourth of July crowd at Chicago’s Navy Pier and a security guard’s warning about a possible shooter preceded a stampede that injured more than a dozen people gathered for the holiday, a police official said Friday.

There was no shooting, but shortly after 10 p.m. there was a stabbing in which a young man wounded three people after an argument outside the landmark.

Around the same time, crowds were leaving Navy Pier after a fireworks display and police received reports that someone may have set off a firework in a group of people, Bureau of Patrol Chief Fred Waller told reporters.

"As commotion continued, private security officers that were assigned to Navy Pier signaled a possible active shooter and began to caution the crowd to take shelter to the ground," he said. "This caused a stampede-like situation."

Police said 14 people suffered injuries related to the stampede, but none of the injuries were life-threatening.

A 14-year-old boy was stabbed in the arm and rib, and a 15-year-old boy was stabbed in the armpit. Both were listed as stable Friday, NBC Chicago reported. A 30-year-old was stabbed in the face and arm.

Chicago Police Superintendent Eddie Johnson said Friday that the chaos was probably caused by a firework that was mistaken for gunfire.

But the police superintendent said that he didn't want to condemn the security guard who urged the crowd to get down. "He may have thought there was an active shooter," Johnson said.

"If you're going to make an errant judgment, we want to err on the side of caution — but suppose there had been an active shooter," Johnson said.

Waller said that after the active shooter report, police and federal agencies implemented an "active shooter protocol" and began searching the pier. There was never an active shooter and no one was shot, police said.

Thousands of people gather at Chicago's Navy Pier to celebrate and watch the 4th of July fireworks on July 4, 2019. Amr Alfiky / AP

The fireworks show was so crowded that Navy Pier officials said that an entrance was closed due to capacity before the event.

Thirty-one juveniles were arrested for disorderly conduct related charges and five adults were arrested, including two relating to guns, in the vicinity of Navy Pier when the incident occurred, Waller said.