A passing employee of the San Francisco Municipal Transportation Agency helped detain a violently aggressive man Tuesday, following a bizarre midday stabbing on Market Street.

According to the San Francisco Police Department, a 49-year-old man was standing in a Muni shelter on the 900 block of Market Street, which is between Taylor and Powell Streets, at 12:59 p.m. Tuesday when the attack occurred.

Police say that a 35-year-old male suspect approached the victim, asking if the older man had a pocket knife he could borrow.

When the man generously handed over the implement, the borrower "started stabbing [the victim] multiple times with the knife," according to the SFPD

In an effort to escape his assailant, the victim ran into the street and "jumped into a City MTA truck," police say.

According to the SFPD, the MTA staffer jumped into hero mode, protecting the victim and tackling the suspect. The city worker "detained him until the police arrived on the scene."

The suspect in the stabbing was arrested, police say. The victim's injuries are considered non-life-threatening, according to the SFPD, and he's expected to survive.