Mexican state television, Milenio, reported the explosion occurred in the basement of an administrative building next to the iconic, 52-story tower of Pemex, just after 3:30 p.m.
The main floor and the mezzanine of the auxiliary building, where the explosion occurred, was heavily damaged, along with windows as far as three floors up, according to Milenio television.
Authorities said the dead were 17 women and eight men. Some 46 people remained hospitalized after the blast, some gravely injured and others with cuts, fractures and burns.
There was uncertainty on whether not all of the people that were trapped under the debris were freed but Interior Minister Miguel Osorio Chong said the search will continue. Roughly 10,000 people worked at the oil headquarters.
More than 500 firefighters, soldiers and rescue workers dug through chunks of concrete with dogs, trucks and a Pemex crane to find survivors.
President Enrique Pena Nieto urged people not to speculate on the cause of the blast. Theories ranged from an electrical fire to an air conditioning problem to a possible attack.
"We have no conclusive report on the reason," Pena Nieto told reporters. "We will work to get to the bottom of the investigation to find out, first, what happened work, and if there are people responsible in this case, that we apply the full weight of the law against them."
Earlier reports from Milenio television indicated that an accumulation of gas in a substation, which supplies electricity to the facility, was the cause of the explosion at Pemex Tower.
Pemex has experienced a number of deadly accidents in recent years.
Just this past September, more than two dozen people died after an explosion at a Pemex natural gas facility in northern Mexico.
More than 300 were killed when a Pemex natural gas plant on the outskirts of Mexico City exploded 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.
Get more interesting environment and science and space news. Also, follow along with the thousands of others for periodic weather updates, news and notes on Twitter.