When officers arrived at an intersection in the Bayview early Wednesday, they found blood and bullet casings but no shooting victims.
A call from a local hospital shortly after helped put some of the pieces together for police.
A 25-year-old man was admitted to San Francisco General Hospital with a gunshot wound to the leg. Though he was uncooperative with officers, police believe he was shot by an unknown person with a handgun at La Salle Avenue and Newhall Street around 3:09 a.m.
Police have made no arrests in the shooting.
The wounded man is expected to survive.