Rescuers dug through the night while investigators searched for answers on Friday after an explosion rocked the headquarters of Mexican state-run oil giant Pemex, killing 25 people.

Another 101 people were injured in the explosion, which sent shocked employees pouring out of the 54-floor Mexico City skyscraper beneath a pillar of black smoke, some carrying wounded people out on office chairs.

Hundreds of fire fighters, police and soldiers toiled through the night after the blast ripped through an annex of the tower on Thursday, but the cause of the blast remained a mystery while officials cautioned against any speculation.

"A good part of the rubble was removed and we hope to be able to finish the removal in the morning," a city civil protection spokesman told AFP, adding that the search focused in the basement.

Survivors described an earthquake-like rumble that shook the floor and shattered windows after the explosion heavily damaged the annex's ground floor and mezzanine. Witnesses said a roof connecting the annex to the tower collapsed.

At least six ambulances were at the scene in case any people were found, while police partially reopened traffic on the heavily-travelled avenue in front of the complex. Officials said 46 people remained hospitalized.

"We were waiting all night to assist in a major emergency that did not materialize because, fortunately, it appears that almost everybody was taken out," a military nurse who refused to give her name told AFP.

Floodlights shined on the rubble and two cranes were brought to help rescuers in hard hats and surgical masks look for survivors. One survivor was found almost six hours after the blast, which took place around 3:40 p.m. (2140 GMT).

Pemex director general Emilio Lozoya Austin was scheduled to hold a press conference early Friday.

"I don't have any conclusive report on the cause, which is why I insist against any speculation," President Enrique Pena Nieto told reporters after visiting the site late Thursday.

A spokesman for the civil protection agency said there was an apparent "accumulation of gas" in an electrical supply room, but the exact cause of the blast has yet to be confirmed.

Interior Minister Miguel Angel Osorio Chong said 17 women and eight men had died.

Almost eight hours after the blast, he said it was hard to know if anybody was still trapped in the rubble. He said he had ordered that "national and international experts" be invited to help with the investigation.

"The goal is clear: The investigation must produce precise, trustworthy and convincing data to find out the origin and cause of the disaster," he said.

Emergency workers with rescue dogs, helicopters and several ambulances were at the scene in the capital - a city that is equipped to handle earthquakes - as dazed survivors lingered, shocked by the destruction.

"We had two minutes to leave the building. I was headed to the pharmacy when the windows broke. It was a deafening noise," Astrid Garcia Trevino, who worked in the annex, told AFP. "The floor shook as if it was an earthquake."

Some witnesses told local media that a number of people were trapped in rubble.

"It was dramatic. The building was shaking and suddenly there was debris. We couldn't even see the people next to us," Pemex employee and union member Cristian Obele told reporters.

"Windows broke, people were injured and a lot of people were in shock," an unidentified worker told the Televisa channel.

Gloria Garcia said her brother Daniel, 35, had called from the building and said he was trying to get out. She hasn't heard from him since, and said she feared he was buried under the rubble.

Pemex, the world's fourth-largest crude producer with around 2.5 million barrels per day, said the administrative center would remain closed "until further notice," after it had earlier been evacuated due to an electrical failure.

The company said production would continue "without irregularities" and that it would honour its financial and commercial commitments.

The company has experienced deadly accidents at its oil and gas facilities in the past. Last year, a huge explosion killed 30 people at a gas plant near the northern city of Reynosa, close to the US border.

The previous worst incident took place in December 2010, when an oil pipeline exploded after it was punctured by thieves in the central town of San Martin Texmelucan, leaving 29 dead and injuring more than 50.

In October 2007, 21 Pemex workers died during a gas leak on an oil platform in the Gulf of Mexico. Most drowned when they jumped into the sea in panic.

Pena Nieto took office in December promising to reform Pemex in order to attract more private investment but he insists that the company will never be privatized.