* Explosion kills 25, traps many, injures more than 100
* President courting private investment for state monopoly
* Pemex a byword in Mexico for accidents and oil theft
Emergency services worked into the early hours of Friday to find people trapped in rubble under state oil company Pemex's headquarters in Mexico City after an explosion that killed at least 25 people and injured more than 100.
Scenes of confusion and chaos at the downtown tower dealt yet another blow to Pemex's image as Mexico's new president courts outside investment for the 75-year-old monopoly.
Search and rescue workers picked through debris, and investigators sifted through shattered glass and concrete at the bottom of the building to try to find what caused the blast. It was not clear how many might still be trapped inside.
Pemex, a symbol of Mexican self-sufficiency as well as a byword in Mexico for security glitches, oil theft and frequent accidents, has been hamstrung by inefficiency, union corruption and a series of safety failures costing hundreds of lives.
Thursday's blast at the more than 50-storey skyscraper that houses administrative offices followed a September fire at a Pemex gas facility near the northern city of Reynosa which killed 30 people. More than 300 were killed when a Pemex natural gas plant on the outskirts of Mexico City blew up in 1984.
Eight years later, about 200 people were killed and 1,500 injured after a series of underground gas explosions in Guadalajara, Mexico's second biggest city. An official investigation found Pemex was partly to blame.
Pemex initially flagged Thursday's incident as a problem with its electricity supply and then said there had been an explosion. But it did not give a cause for the blast.
A government official, speaking on condition of anonymity, said a preliminary line of inquiry suggested a gas boiler had blown up in a Pemex building just to the side of the main tower. However, he stressed nothing had been determined for sure.
Others at the scene said gas may have caused the blast.
Not long after the blast, President Enrique Pena Nieto was at the scene, vowing to discover how it happened.
"We will work exhaustively to investigate exactly what took place, and if there are people responsible, to apply the force of the law on them," he told reporters before going to visit survivors in hospital.
Shortly after midnight, at least 46 victims were still being treated in hospital, the company said.
Pemex said the blast would not affect operations, but concern in the government was evident as top military officials, the attorney general and the energy minister joined Interior Minister Miguel Angel Osorio Chong for a late news conference.
"I have issued instructions to the relevant authorities to convene national and international experts to help in the investigations," Osorio Chong said. He later noted that the number of casualties could still climb.
Whatever caused it, the deaths and destruction will put the spotlight back on safety at Pemex, which only a couple of hours before the explosion had issued a statement on Twitter saying the company had managed to improve its record on accidents.
Nieto has said he is giving top priority to reforming the company this year, though he has yet to reveal details of the plan, which already faces opposition from the left.
Both Pena Nieto and his finance minister were this week at pains to stress the company will not be privatized.