Officers said they arrived at the scene following a tip off that a gang were planning a bank raid, and began to shoot after the suspects opened fire.
All 16 of the group were hit in the exchange of bullets and were taken to a nearby hospital.
Thirteen of them died and two were seriously hurt.
Police said no officers were killed, but one was slightly injured.
An investigation has been opened into the incident.
Brazil's police have been criticised in the past for using excessive force in their bid to control violent crime in the country's impoverished neighbourhoods.
At least 13 people have been killed in a shootout between police and armed robbery suspects in the Brazilian city of Salvador.