An iPhone stolen Monday morning in San Francisco's Ocean View neighborhood led police on a high-tech hunt that resulted in an officer firing her weapon, a school being locked down and the apprehension of suspects police say may be linked to a previous robbery.

The pursuit began about 6:30 a.m. when two armed men stopped a pedestrian on the 200 block of Minerva Street and stole an iPhone, police said.

Minutes later, officers tracked the iPhone through a phone-finding GPS app to Noe Valley, where officers approached two suspects who fled on foot, said Officer Gordon Shyy, a department spokesman.

The fleeing suspects ran down a stairwell near St. Paul's Catholic Church on Valley Street at about 6:50 a.m., Shyy said. "With an officer in pursuit, the suspect turned toward the officer with his hand concealed near his torso," he said. "That is when the officer discharged her firearm."

The officer missed and twisted her ankle while chasing the suspect, who got away. Officers, however, detained the second man on Church Street, Shyy said.

A half-hour later, officers tracked the stolen iPhone to a car near Eighth Avenue in the Sunset, where they found one person sitting inside and another hiding in the trunk, Shyy said.

They recovered the stolen iPhone, two replica firearms and property from an earlier robbery, police said. The registration of the car led officers to a residence on Seventh Avenue, where they detained two additional suspects at about 8 a.m.

The two men in the car were booked on suspicion of possession of stolen property. No names have been released and charges remain pending.

Police locked down St. Paul's Catholic Church and its adjoining elementary school for about 30 minutes during the incident. Neighbor Maria Genolio said the children were just arriving as police were securing the scene.

"I saw the expressions on the kids' face walking by," she chuckled. "They're always excited to see policemen, but the parents were hustling them away."

Although most residents described the neighborhood as safe and quiet, they said cell phone theft is becoming too common.