The man shot by police died, and the condition of the stabbing victim is unknown at this time.

San Francisco Police Department Chief William Scott said his officers are obligated to protect the public, but would not say if the man killed was threatening police.

A source told ABC7 News the stabbing victim may have been an employee at Subway.

Just minutes before the stabbing, two foot patrol officers walked past the Subway restaurant on Market Street, and tried to stop the stabbing. "They observed a white male stabbing an Asian, Filipino male. The officers intervened. During the course of them intervening, at least one officer discharged a firearm," Scott said.

Update: Two #SFPD Ofc. were walking on the 900 blk of Market St. They observed a white male subject stabbing an Asian or Filipino male...

The man who was stabbed was taken to a hospital and the other did not survive.

ABC7 News asked Scott if there was any way officers could have avoided the shooting. Scott replied by saying: "Everything right now is under investigation and it's very preliminary."

Nearby residents, like Sharie Pittman were outraged by the shooting. "So, we have a fight, we fixing to get shot? I fight all the time," she said.

Surveillance video from a Muni bus was taken by police to help shed some light on the shooting.

Police worked to interview witnesses who may have seen what happened. "It's heartbreaking, it's frustrating. I've been living here in the Tenderloin for 11 years and I've seen so much since I've been living here," San Francisco resident Marjorie Robinson said.

Scott is dealing with the first deadly officer-involved shooting in the city since he took over three months ago. In March, police were hailed for their efforts to subdue a woman during a standoff without the use of force.

"The loss of life is tragic and it doesn't matter how it happens, it's tragic. So, these things, we try to avoid them as much as we can, but we do have an obligation to protect the public. Nobody wants to see anybody's life taken, ever," Scott said.

Market Street was shut down after the shooting, but has since reopened.

Muni has resumed service, but people are being warned about residual delays.