A police officer carries weapons to the jewelry mart at 888 Brannan St., where two women were killed and a man injured.

Photo: Katie Meek, The Chronicle

A police officer carries weapons to the jewelry mart at 888 Brannan...

Image 2 of 6

Police officers and other FBI officials have discussions between Eighth Street and 888 Brannan by the Jewelry Mart which was scene of a double shooting at an apparent robbery at the South of Market jewelry store on Friday, July 12, 2013 in San Francisco, Calif.

Photo: Katie Meek, The Chronicle

Police officers and other FBI officials have discussions between...

Image 3 of 6

Crowds gather between Eighth Street and 888 Brannan Street which was scene of a double shooting at an apparent robbery at the Jewelry Mart on Friday, July 12, 2013 in San Francisco, Calif.

Photo: Katie Meek, The Chronicle

Crowds gather between Eighth Street and 888 Brannan Street which...

Image 4 of 6

Police officers have discussions between Eighth Street and 888 Brannan by the Jewelry Mart which was scene of a double shooting at an apparent robbery at the South of Market jewelry store on Friday, July 12, 2013 in San Francisco, Calif.

Photo: Katie Meek, The Chronicle

Police officers have discussions between Eighth Street and 888...

Image 5 of 6

Sargent David Almaguer patrols the scene of a double shooting at an apparent robbery at the Jewelry Mart on 888 Brannan Street on Friday, July 12, 2013 in San Francisco, Calif.

Photo: Katie Meek, The Chronicle

Sargent David Almaguer patrols the scene of a double shooting at an...

Image 6 of 6

An SFPD official talks with FBI agents at 888 Brannan after a gunman fatally shot two women and wounded one man on Friday, July 12, 2013.

Two women were killed and a man was injured Friday at a South of Market jewelry store, with the blood-soaked suspect emptying his revolver at police officers before surrendering, San Francisco police said.

Police declined to say whether it was a robbery gone bad or a more personal dispute.

"We don't know what relationship the suspect had to the victims," Police Chief Greg Suhr said. After talking to people in the five-story Gift Center and Jewelry Mart at 888 Brannan St. at Eighth Street, police concluded that "this was not the first time (the suspect) had been seen in the building," the chief said.

Esther Ishag, who works in the family-owned Design Jewelers, said she first heard of the shooting when a man passed her store and told them there was a man with a gun in the building.

"My brother and nephew ran out and saw a guy covered in blood," she said. "They said they saw him reloading the gun."

With the many jewelry stores in the building, security is very tight, Ishag said. Shoppers must have an invitation from a shop owner because they need a pass to get into the building.

The afternoon's deadly toll was almost much worse.

Officers responding to a 2 p.m. report of shots fired spotted a man covered in blood walking west on Brannan. "The officers didn't know whether he was a victim or a suspect," Suhr said.

They quickly found out when the man pulled a handgun and opened fire, police said. As the officers jumped for cover, the suspect ran into a restaurant, still shooting.

When the man apparently ran out of ammunition, "he threw the gun on the ground, went prone and surrendered," Suhr said.

None of the three officers involved fired a shot and none of them was injured. They were unable to get a clear shot at the suspect once he was inside the restaurant, which was filled with customers, the chief added.

Police said the suspect, whose name was not released, had apparently acted alone. He was arrested and taken to San Francisco General Hospital with what police described as superficial wounds to his hands. They were unable to say whether the blood that soaked his clothes belonged to him or the victims.

Besides the revolver, police also recovered a folding knife.

Inside the jewelry mart, police found the bodies of two women in the Victoga jewelry shop, one of more than 100 small shops in the building. They also found a man with possible gunshot wounds, Suhr said. He was taken to a hospital, where he was in stable condition.

The two women, whose names were not released, were either shot or injured with a knife, Suhr said.

Victoga is in the basement of the center, and Ishag's store is on the ground floor, but she said she knew the two clerks who died, adding that one was about 35 and the other about 45.

"They were very, very nice girls," she said.

The building was a scene of chaos in the minutes following the shooting.

Veronica Sirois, who was shopping at the gift center, said she had heard "somebody yell, cry for help. Then I saw the SWAT. There was a dozen of them. They told us to lock ourselves in.

"I saw blood on the way out and a pair of bodies," Sirois said.

An East Bay man who gave his name only as Kyle was at Derco Fine Jewelers, across from Victoga, when he heard the gunfire.

"We just scrambled over the counter and went to the back of the store," he said. "I heard people screaming and others on their phones, calling 911."

It was a half hour before police came and told the dozen or so people hiding in the store that it was safe to come out.

Hundreds of people in nearby stores and buildings, including the REI store and Zynga headquarters, were ordered to shelter in place while officers conducted their search of the building.