A man killed himself with a gunshot to the head when cornered by police after he and an accomplice robbed passengers on a bus in this capital, Salvadoran media said Thursday.

An amateur video of the suicide was posted on the Web site of La Prensa Grafica newspaper.

The video came from a "citizen journalist," the daily said.

Police responding to calls from some of the bus passengers rushed to the scene and quickly caught up with one of the assailants, Fernando Garcia.

The other suspect, identified as Ruben Gamero, managed to elude the officers across several blocks, but the cops finally cornered him between parked cars.

Defying commands to surrender and hand over his weapon, Gamero put the gun to his head and fired, according to the deputy head of the transit police, Cesar Flores.

"He said he would rather kill himself than be captured by us," one of the cops involved in the chase told a San Salvador television station.

Buses are a frequent target for armed robbers in El Salvador. EFE