An explosion at an unlicensed fireworks factory in an industrial section of Istanbul killed 20 people and injured 117 others Thursday, officials said.

The city's governor, Muammer Guler, blamed fireworks manufactured illegally in the multi-story building. He ruled out terrorism, and said an investigation was under way.

Mayor Kadir Topbas said a chain of explosions destroyed the top two floors of the five-story building in the Davutpasa district Thursday morning.

The first blast, at about 9:30 a.m. (2:30 a.m. EST), sparked a fire that drew onlookers, he said.

"The first explosion started a fire and people began gathering outside to watch it," Topbas said. Minutes later, there was a second explosion.

At least 20 people were killed — including eight onlookers — and 117 injured, eight seriously, he said.

"White smoke was rising into the sky from the factory as we came to the front of the building. People were running around. I helped carry out six injured people," a witness who identified himself as Ali told CNN-Turk television.

The force of the blast destroyed the top two floors and columns of nearby buildings, sending debris showering down on cars parked on the street below.

Police sealed off the area as rescue workers pulled bodies from the rubble. TV footage showed at least two men lying in the street as a man with blood on his face walked nearby.

The factory housed textile makers and an unlicensed fireworks manufacturer, reports said. The building had been shut down by authorities twice before but continued its work illicitly, a municipal director, Murat Aydin, told NTV television.

Davutpasa is home to an industrial zone with many unregulated businesses. Topbas said regulation is difficult because there are so many factories in the city of more than 12 million people, and he appealed to residents to inform authorities about unlicensed manufacturers.

In 2005, a series of explosions at a fireworks depot in Istanbul killed six people. The explosions occurred in a section of the warehouse that was not licensed to hold fireworks.