San Francisco police officer witnesses shooting, leads to arrest of 46-year-old man

San Francisco police arrested a man on Sunday after an officer witnessed a shooting in the city's Tenderloin neighborhood, police said.

An officer in plainclothes was in the area of Golden Gate Avenue and Hyde Street at around 5 p.m., when the officer spotted an armed man who opened fire, injuring a victim.

But by the time officers got to the scene, both the victim and gunmen had fled, according to police.

A search of the area led to the victim, who was taken to a hospital. He's expected to survive.

Police also located the suspect and took him into custody. He's been identified as 46-year-old William Cogman. He was arrested on charges including suspicion of attempted murder and carrying a concealed weapon. 

KTVU contributed to this report.