Television images showed the explosion blew the roofs of some buildings and demolished and overturned cars.
Fire department spokesman Marco Antonio Barbosa said it wasn't clear if the building that exploded was used to make, store or sell fireworks.
Local news media earlier reported that as many as 11 people were killed, citing city officials.