(CNN) A man who took a bus and 37 people hostage on a bridge in the Brazilian city of Rio de Janeiro was shot dead on Tuesday by a police sniper, according to authorities.
The hostage taker, who identified himself as a military policeman, was armed and threatened to set the bus on fire with gasoline at around 6 a.m. local time (5 a.m. ET), military police said.
According to the state news agency Agencia Brasil, he hijacked the vehicle on the Rio-Niterói bridge. The crossing, which is about nine miles long, connects the cities of Rio de Janeiro and Niterói.
"The hostage situation on the Rio-Niteroi bridge has come to a close," a statement from military police read. "The hostage taker was neutralized by a sniper from the elite squad and all the hostages were freed."
Police added that all hostages were unharmed.
The armed man earlier freed six hostages, CNN affiliate Record TV reported.