(Updates death toll; adds president's comments, details throughout)
KAOHSIUNG, Taiwan, Aug 1 (Reuters) - An explosion caused by a gas leak killed 24 people and injured 271 in Taiwan's second city on Friday, sending flames shooting 15 storeys into the air, setting entire blocks ablaze and reducing small shops to rubble.
The Central Disaster Emergency Operation Center said police and soldiers had been drafted in to help firefighters after the midnight explosion and blaze gutted a district in the port city of Kaohsiung packed with shops and apartment buildings.
Four firefighters were among the dead. Media reports suggested the death toll was likely to rise sharply.
President Ma Ying-jeou pledged tough measures to prevent any recurrence of the incident.
"We will make further arrangements and inspections to avoid this kind of disaster from occurring again," Ma said in comments shown on television after speaking via a video link with Kaohsiung's mayor.
The blast sent flames racing through the district and smoke billowing high into the air. Flames shot up from sewers and gutters and water from burst mains gushed through the streets.
Residents said the blast shook buildings like there was an earthquake, toppling small shops and overturning cars.
Rescuers formed a chain to pull dozens of injured from a vast crater in the street and picked their way through piles of rubble as they ferried the injured away on stretchers.
Victims overcome by smoke were resuscitated in the street.
The body of a motorcyclist lay covered by a sheet next to his battered vehicle and another body had been placed on a slab of concrete next to piles of debris.
Kaohsiung authorities set up an emergency centre to be staffed by servicemen coordinating the rescue operation.
By morning, firefighters had regained control of the district and were moving in protective white gear through streets covered in upturned asphalt and smashed vehicles.
Economic minister Chang Chia-juch told reporters initial assessments suggested the blast was caused by a leak of propylene, a material used in the production of plastics and fabrics.
Taiwan's two foremost petrochemical companies said their operations were unaffected by the blast.
An official from Formosa Petrochemical said the company's facilities were not located near the disaster site and its factories were functioning normally. State-owned CPC Corp. also said it was operating normally. (Wrtiting by Faith Hung; Additional reporting by Michael Gold, Roger Tung and Jeanny Kao in Taipei; Editing by Ron Popeski)