Updated

A police officer and five civilians -- including a suspect -- were wounded during an exchange of gunfire in San Francisco on Wednesday afternoon.

When the shooting was over, the suspect was in custody, FOX 2 reported.

Dramatic video posted on Twitter shows the injured officer crawling to safety.

Police were responding to a call on the edge of the city's Crocker-Amazon and Excelsior neighborhoods around 4:30 p.m. when a suspect fired at the officers, the San Francisco Chronicle reported.

The scene became immersed in chaos as dozens of schoolchildren and pedestrians ducked for cover and hid behind cars to avoid stray bullets, the report said.

The owner of a nearby pharmacy described the scene to the Chronicle.

“I couldn’t believe what was happening,” he said, estimating he heard 20 to 25 shots. “I’ve never experienced something like this before and I’ve been here 30 years. We have had shootings before but never in broad daylight or during business hours. It was scary, the way it happened.”

One officer was struck in a leg and wounded. He was treated behind a patrol car and was in stable condition at San Francisco General Hospital.

Five civilians, including the suspect, were injured – two critically, and three in stable condition, police said.  One of the injured pedestrians was reportedly a minor, but there were no further details on the minor’s condition, FOX 2 reported.

San Francisco authorities are still investigating.