* Government refuses to speculate on cause of explosion
* President courting private investment for state monopoly
* Pemex a byword in Mexico for accidents and corruption
By Gabriel Stargardter and David Alire Garcia
MEXICO CITY, Feb 1 (Reuters) - Mexico's government vowed on Friday to find out whether an explosion that killed 33 people at the headquarters of its state-run oil monopoly Pemex was a deliberate attack or yet another stain on the company's poor safety record.
Rescue workers continued to pull bodies from the debris on Friday and officials said the search would continue until they account for everyone inside the Mexico City building.
Government officials have refused to speculate over what caused the explosion on Thursday but said they had deployed large teams of experts to pore through the wreckage.
"The government is determined to find out the truth, whatever that may be ... whether it was an accident, negligence or an attack, whatever," Attorney General Jesus Murillo said on Friday evening. "We are not going to rule out anything."
He said the explosion did not cause a fire but refused to be drawn on what that implied about the cause. Parts of the reinforced concrete ground floor of the building caved in, and the ceiling was a mess of twisted metal pipes and ducts.
The blast at Pemex's complex in the capital killed at least 33 people and a further 121 were injured. The scenes of chaos have dealt another blow to Pemex's image, just as Mexico's new government is seeking to open up the oil industry to more private investment.
Speculation over the cause has ranged from a bomb attack, to a gas leak, to a boiler blowing up.
"A fatal incident like yesterday's cannot be explained in two hours. We are working with the best teams in Mexico and from overseas. We will not speculate," Pemex's chief executive, Emilio Lozoya, said on Friday.
FIRST TEST FOR NEW PRESIDENT
New President Enrique Pena Nieto declared three days of national mourning.
Pemex, which was created when Mexico nationalized its oil industry in 1938, is a symbol of self-sufficiency but it has also been blighted by corruption, inefficiency and frequent accidents costing hundreds of lives.
The latest Pemex disaster is one of the first serious tests for Pena Nieto, who must overcome the legacy of his Institutional Revolutionary Party, or PRI, which ruled for much of the last century.
After seven decades in power, the party gained a reputation for corruption and cover-ups that have made Mexicans skeptical of whether they are being told the truth.
Investors have been closely following how far he will go in enticing private capital to boost flagging oil output in a country that is the world's No. 7 producer.
"This incident speaks very poorly of the image of Pemex management, and that's interpreted as additional risk in the market," said Miriam Grunstein, an energy researcher at Mexico's CIDE think tank.
A Pemex official said the damaged area of the company's headquarters was used for human resources in the corporate and refining divisions. It did not have a boiler or gas installations, the official said.
Former Pemex worker Ricardo Marin, 53, said there was nothing in the building that would explode and that the kitchen, where there would be gas, was on the other side.
"The only thing that occurs to me is that it was an attack - but against whom? There's no one with an important job down there," he said, waiting outside the Pemex hospital where a friend was in intensive care. "Maybe it could be a message to Pena Nieto, but not even that has any logic."
Pemex office worker Alfonso Caballero, who was one floor above the blast at the time, said he did not smell any gas and guessed it had been caused by machinery.
Mexican officials have not ruled out sabotage.
An official at the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives said an "international response team" was on its way to Mexico City at the request of the Mexican government. The team includes explosive specialists and fire experts.
Pemex CEO Lozoya said the four floors most affected by the explosion normally had about 200 to 250 people working on them. About 10,000 staff work in the entire complex.
Red Cross official Isaac Oxenhaut said the ceiling had collapsed in three lower floors of the Pemex building.
The blast followed a September fire at a Pemex gas facility near the northern city of Reynosa that 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.
Whatever caused the explosion, the deaths and destruction will put the spotlight back on safety at Pemex, which only a couple of hours beforehand had issued a statement on Twitter saying it had managed to improve its record on accidents.
"I suspect this was a bomb," said David Shields, an independent Mexico City-based oil analyst. "There are clandestine armies across Mexico, not just the (drug) cartels."
Shields pointed to the bombing of several Pemex pipelines in the eastern state of Veracruz in 2007. A shadowy Marxist rebel movement took credit for some of the blasts.
Meanwhile, George Baker, director of Energia.com, a Houston-based energy research center, said past history suggested the government could seek to exploit the incident.
He pointed to the 1992 Guadalajara blast and the subsequent deal that followed to overhaul the Pemex administration led by then-President Carlos Salinas, like Pena Nieto a PRI member.
"Salinas said he wanted a response from Pemex, and months later Pemex announced a restructuring. The restructuring had nothing to do with the Guadalajara accident, but it was used as a pivot to do something," Baker said.
Pena Nieto has yet to reveal details of his Pemex reform 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.