Another 100 people were injured and an unknown number are trapped in rubble at the base of the 54-storey tower. The search for survivors continues.
The cause of the blast is under investigation, Pemex says.
Last September, 30 people died in an explosion at a Pemex gas plant in northern Mexico.
Thursday’s explosion in the lower floors of the building happened as shifts were changing in the afternoon, making the area particularly crowded.
Television pictures showed debris from the blast spread out on to the street in front of the building, and Red Cross ambulances on the scene attending to the injured.
Hundreds of rescuers helped by dogs are searching the building for around 30 people thought to be trapped inside.
Police have cordoned off the streets around the building, which is located in a busy commercial area of Mexico City.
Pemex says its operations will continue to run normally – and commercial and financial obligations will continue to be met – despite the blast.
The company’s chief executive, Emilio Lozoya Austin, cut short a business trip to Asia and was on his way back to Mexico, a Pemex statement said.
Relatives of employees have gathered outside the building in search of information about their loved ones, local media report. Some are said to have tried to reach employees on their mobile phones but have had no reply.
“The place shook, we lost power and suddenly there was debris everywhere. Colleagues were helping us out of the building,” eyewitness Cristian Obele said.
“We were talking and all of sudden we heard an explosion with white smoke and glass falling from the windows,” another witness said.
“People started running from the building covered in dust. A lot of pieces were flying.”
Images of the blast posted on Twitter revealed large clouds of smoke billowing from the building. TV footage showed people being transported from the scene by helicopters.
President Enrique Pena Nieto and Mexico City Mayor Miguel Angel Mancera headed to the scene of the blast.
Enrique Pena Nieto said Pemex rescue and security teams were working alongside city authorities to help the injured.
“I am deeply sorry for the deaths of our fellow workers at Pemex. My condolences to their relatives,” President Enrique Pena Nieto said on Twitter.
“At the moment, the priority is to help the injured and protect the physical safety of those who work there.”
The president said he has ordered an investigation into the causes of the blast.
Earlier on Thursday, Pemex had reported problems with the electricity in the building in a message on Twitter.
It later confirmed that an explosion had taken place “in the B2 building of the administrative centre”.
Plaster had fallen from the ceiling of the basement and the situation was “delicate”, a spokesman for local emergency services was quoted by the Reuters news agency as saying.
Pemex has experienced a number of fatal accidents in recent years.
Last September’s deadly blast at a gas plant near the northern town of Reynosa is thought to have been caused by a build-up of gas.
4W0hbfTINvkThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…