At about 6:55 a.m., officers responded to reports of shots fired near Eddy and Webster streets, San Francisco police Sgt. Michael Andraychak said.
Arriving officers found multiple bullet shell casings near the intersection, and a witness said that a gunman had been seen entering a nearby residence, Andraychak said.
A tactical police team responded, and the building was surrounded.
Just before 11 a.m., all residents of the building were ordered to come out, Andraychak said. Several adults and as many as four children exited the building.
One of the people who came out has been identified as a possible suspect in the shooting and was taken into custody.
Andraychak said that drops of blood were found near the 1500 block of Eddy Street that could have been linked to the shooting.
No victims had been located as of 1:15 a.m., he said.
The incident remains under investigation.
Anyone with information about the case is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.