Forensic specialists in white suits worked among the charred, blackened corpses at the scene, which was guarded by soldiers as the pungent smell of fuel hung in the air.
Before the blast, residents had gathered around the pipeline to collect fuel from the spill, newspaper Milenio reported.
People react at the scene where a ruptured fuel pipeline exploded, in the municipality of Tlahuelilpan, Hidalgo, Mexico, near the Tula refinery of state oil firm Petroleos Mexicanos (Pemex), Jan. 18, 2019.
The tragedy comes during a highly publicized federal government war on fuel theft, a problem that cost Mexico an estimated $3 billion in 2017.
Lopez Obrador faces an uphill fight against a practice that locals say is deeply rooted in the poor rural areas where pipelines pass, covered by only a foot or two of dirt.
Dozens of people have been taken to hospitals with burns. Fayad said at least 76 others were injured in the blast.More news: Twitter hails Warner for stunning show as right-handed batsman
More news: Prince Philip Uninjured After Being Involved in Car Crash
More news: Netflix criticised for using real disaster footage in Bird Box
"The people already know what they're getting into with this", he said as he wrapped a blanket tightly around himself against the cold.
Veteran leftist Lopez Obrador launched a crackdown on fuel theft on December 27 and ordered pipelines to be closed temporarily to stop illegal taps draining billions of dollars from the heavily-indebted state oil firm Petroleos Mexicanos (Pemex).
By around midnight Friday the fire had been brought under control, the security ministry said.
The explosion was one of the worst in recent history in a country that has suffered hundreds of illegal ruptures to its network of oil and gas pipelines.
The government has shut off major pipelines until they can be fully secured and deployed the army to guard Pemex production facilities.
The policy has led to increased reliance on tanker deliveries and there have been widespread reports of fuel shortages and long lines at petrol stations across the country.
The government has said the practice cost the country about $3bn (£2.3bn) a year ago.
"We are going to eradicate that which not only causes material damages, it is not only what the nation loses by this illegal trade, this black market of fuel, but the risk, the danger, the loss of human lives", he said.