A 19-year-old man who was refused a ride by a North Beach taxi driver ended up behind bars late Sunday, when the confrontation escalated into a violent attack.

According to the San Francisco Police Department, the teen had flagged down a cab on the 500 block of Broadway, which is between Kearny Street and Grant Avenue, at 10:24 Sunday evening.

Police say that when the man got into the taxi, the 63-year-old male driver refused to give him a ride. Enraged, the aspiring passenger allegedly threatened to kill the cabbie, who hopped out of the vehicle in an attempt to escape.

The angry passenger-who-wasn't made an effort to chase the taxi driver down, but was stymied by an 31-year-old male security guard, who attempted to intervene in the altercation.

Police say that the teen bashed the guard with a bottle, at which point officers with the SFPD arrived and arrested the miscreant.

The guard, who suffered minor injuries in the attack, was treated at the scene. As of Tuesday morning, his alleged assailant remains in custody.