One victim, a teenage girl, was critically wounded after the shooting near the June Jordan School for Equity around 3:20 p.m. local time, while two teenage boys suffered non-life-threatening injuries, police said.
The San Francisco Unified School District said in a statement that a fourth person was also wounded but could not provide any further information on the victim.
The school was placed on lockdown, which has since been lifted.
School officials said one of the victims was specifically targeted. The three others were bystanders, the district said.
Police said four male suspects were seen fleeing the scene shortly after the shooting.
The district said classes will continue as scheduled on Wednesday.
Further details were not immediately available, police said, as the investigation was early and ongoing. (Courtesy Reuters)