There were several flashes and loud bangs, and people shouted that a power transformer had exploded as they were running away, according to Facebook user 'Oaky Ekarat Soyin', who claimed to have witnessed the incident.
Bangkok Governor Chadchart Sittipunt told reporters that a power transformer at a three-story building exploded, triggering the fire that quickly engulfed the building.
"The fire was now brought under control," he said, adding two people were dead and nine others, mostly firefighters, suffered smoke inhalation.
The dead, a 35-year-old Myanmar migrant worker and a Thai national, worked at a shop selling packaging mostly made from plastic materials, according to Thai media.
Authorities said the two were trapped inside as the fire occurred at the store's entrance. An investigation has yet to take place.
(Reporting by Juarawee Kittisilpa; Writing by Orathai Sriring; Editing by Toby Chopra)