The 18-year-old and 16-year-old suspects have been arrested on suspicion of several felonies including assault with a deadly weapon and other gang-related offenses, Lt. Troy Dangerfield said.
The two suspects allegedly opened fire in the 1000 block of Market Street at about 6:15 p.m., Dangerfield said. Two people were shot in the leg and one was shot in the buttocks, while two other victims were shot in the torso, he said.
None of the injuries were life threatening and all victims are being treated at San Francisco General Hospital, Dangerfield said.
Four of the five injured were bystanders, he said. The unintended victims were a 17-year-old boy from El Cerrito, a 22-year-old man from Santa Cruz, a 45-year-old man visiting from England, and a 74-year-old man from San Francisco.
Information about the intended victim and the names of the two suspects is not being released by police.
Witnesses said they saw two groups of people involved in some type of fight before the shooting, Dangerfield said.
The case is being investigated by the San Francisco Police Department's Gang Task Force, he said.
The shooting was not related to the San Francisco Pride Celebration taking place at nearby Civic Center, Dangerfield said.
San Francisco police do not anticipate any similar incidents at today's Pride Parade, which starts at Market and Beale streets and ends at Market and Eighth streets, he said.