The shooting occurred around 10 a.m. as the light-rail train was moving between stations, according to San Francisco Police Department spokesperson Kathryn Winters.
Winters said police were initially called to the city's Forest Hill Muni station for a report of a shooting, but the train had already pulled away. Officers caught up to the train at the busy Castro Street Station, where they discovered the two victims, Winters said.
Police late Wednesday released a photo of a person of interest connected to the shooting.
Winters said the gunman and commuters aboard the train ran off as soon as it stopped and the doors opened at the station.
Winters said one victim, a man, was pronounced dead at the scene. A second individual was taken to Zuckerberg San Francisco General Hospital and Trauma Center with non-life-threatening injuries.
The shooting happened ahead of this Sunday's Pride Parade in San Francisco and in the heart of the city's popular Castro District, which is expected to be filled with revelers celebrating LGBTQ pride this weekend. Winters said preliminary evidence showed that the shooting has no connection to this coming weekend's activities or directed at the city's LGBTQ community.
San Francisco Supervisor Myrna Melgar told ABC station KGO-TV in San Francisco that police informed her that the shooting occurred during a confrontation the gunman had with the victim who died.
"We do know the shooting happened after a heated verbal argument," Melgar said.
It was not immediately clear whether the gunman and the deceased victim knew each other. She said the second victim who was wounded was an innocent bystander.
Winters said on Wednesday that homicide detectives were securing surveillance video from the train and the Forest Hill and Castro stations in hopes there was footage of the shooting that could help them identify the assailant.
Police had released a vague description of the perpetrator, saying he was a man wearing dark clothes and a hooded sweatshirt.
Melgar asked any commuters who were on the train and witnessed the shooting to contact police immediately.
Report a correction or typo