The robbery was reported around 6:30 a.m. near 225 Minerva St. in the city's Oceanview neighborhood. The female victim was walking down the street with her smartphone when she was robbed at gunpoint, Suhr said.
Police used a GPS feature on the cellphone to track it to the Balboa Park BART station. A short time later, the phone was tracked to 28th and Church streets.
An officer responding to that area saw two people matching the description of two of the suspects involved in the robbery, Suhr said.
The officer pursued the suspects on foot near St. Paul's Catholic Church. When one of them made a move toward the officer, she fired her gun, Suhr said. No one was hit by the gunfire.
Police were able to detain one of the suspects but the second continued to flee.
The officer who fired her gun twisted her ankle during the pursuit but was not seriously injured, Suhr said.
Meanwhile, St. Paul's Elementary School at Church and Valley streets went into lockdown, just as parents were beginning to drop off their children for school. A man answering the phone at St. Paul's church said school personnel were notifying parents of the situation.
A short time after the officer-involved shooting, the GPS locator tracked the phone to a spot along Seventh Avenue, where one suspect was found driving a car and another was in the vehicle's trunk, Suhr said.
Police pulled over the car and detained the two suspects. The victim's cellphone was found in the car, along with at least one other phone.
Officers then went to the address to which the car was registered and detained two more people there, the chief said.
Since then, investigators have been working with the victim to determine whether all five people in custody were involved in the robbery.
The lockdown at St. Paul's school has been lifted, but as of 9 a.m. Valley Street was still blocked off at the site of the shooting while police continued their investigation.
Suhr said the phone's tracking feature was key in locating the suspects this morning.
"GPS on the phone helps us out a lot," he said.
Suhr said smartphone robberies are a problem not just in San Francisco but nationwide. He urged residents to be cautious and aware of their surroundings when using their smartphones in public.
"People need to be conscientious with their electronic items," he said.