Thieves strapped hostages to the top of their getaway vehicles after looting a bank in the southern Brazilian city of Araçatuba.
Police said that at least three people were killed, among them one suspect.
Officials said more than 20 people took part in the heist, blocking off roads with burning vehicles and placing explosive devices across the city.
Large-scale bank robberies have become more frequent in recent years, with hostages used as human shields.
Initial reports had put the number of assailants at more than 50 but that number has since been revised down to between 15 and 20.
Lieutenant Alexandre Guedes of the Military Police told GloboNews that one man was killed by the gang when they found him filming them.
A woman and a suspect were killed in a stand-off with police outside the city as gang members tried to make their escape, officials said.
A 25-year old cyclist was seriously injured when one of the explosive devices planted by the gang went off as he cycled past.
He was taken to hospital, where both of his feet had to be amputated, local media reported.
Three other men are in hospital with bullet wounds.
Lt Guedes said there were still at least 14 bombs across the city and that the first indication was that they had some sort of sensor, which is triggered either by heat or motion.
The police has urged residents to stay indoors until all the devices have been dismantled.
Police said three suspects had been arrested.
A gang of heavily armed men attacked three banks in the centre of Araçatuba in the early hours of Monday local time.
After the robbery, the gang took a number of hostages and surrounded the local military police station. Gang members also blocked key access roads into the city by setting cars alight, local media reported.
Record TV journalist Yuri Macri posted video he said showed two of the getaway cars. The first has a person tied to its roof and another to its hood, while in the second, a person can be seen crouching on the hood.
Many residents reported hearing gunfire and even the sound of explosions.
The mayor of Araçatuba, Dilador Borges, said police had struggled to intervene as the attack unfolded.
“The police can’t go on the attack, they can’t confront them because there are too many lives on the line,” he told Band TV.
He said he did not know if the robbers had freed the hostages yet but said the security forces had retaken control of the city centre.
It is not clear how much money the attackers took but some videos purport to show a resident gathering bank notes in the street.
News site G1 reports that the gang used drones to monitor the movements of the police from the air.
It is not the first time Araçatuba has been targeted by bank robbers. In 2017, criminals took control of various strategic spots throughout the city, attacked police stations and blocked roads as part of their robbery of a private security firm.