MEXICO CITY — Mexico’s president vowed on Saturday to redouble his fight against an epidemic of chronic fuel theft after thieves punctured a pipeline north of Mexico City, causing an explosion that killed at least 66 people and injured 76 others.
The blast underscored the deadly perils of the fuel-theft racket, which has cost the government billions of dollars a year and has been the target of a weekslong crackdown by the administration of Mexico’s new president, Andrés Manuel López Obrador.
“Although it hurts a lot, we have to continue with the plan to end fuel theft,” Mr. López Obrador said during a news conference at the presidential palace in Mexico City. “We will not stop. We will eradicate this.”
The explosion, which occurred Friday night along a pipeline in a rural part of the state of Hidalgo, was particularly deadly because the promise of free gasoline had drawn hundreds of residents to the breach in the pipeline.
Videos taken before the blast showed a raucous atmosphere, with villagers from the rural municipality of Tlahuelilpan, including families, whooping and laughing as they filled plastic jugs, pails and canisters with the gasoline, which gushed from the break like a geyser.
In the footage, military personnel who had rushed to the scene can be seen standing by and observing the throng that had converged on the pipeline, which connects to the nearby Tula refinery operated by the government-run oil firm Petróleos Mexicanos, known as Pemex.
Mexico’s defense secretary, Luis Cresencio Sandoval, said that about 25 troops were on the scene, but the contingent was not large enough to turn back the 600 to 800 villagers who had swarmed the site. He said that his troops tried to persuade residents to retreat but their entreaties were ignored, and some of the people turned “aggressive” toward the soldiers.
About two hours after the authorities learned of the break, the fuel ignited, causing a huge explosion and sending flames and clouds of smoke into the sky. Videos and photographs circulating on social media and broadcast on Mexican news channels showed people engulfed in fire running away from the blaze and victims screaming in pain and wailing for help.
The fire took more than four hours to extinguish.
It was the deadliest pipeline explosion in Mexico in recent memory. In 2010, at least 27 people were killed, scores injured and numerous homes destroyed in a blast in San Martín Texmelucan de Labastida, a city in the state of Puebla. That, too, was caused by an illegal siphoning effort, officials said.
Mexico’s attorney general, Alejandro Gertz, said that the authorities had opened an investigation but insisted that “there was no doubt” the explosion on Friday was caused by an “intentional” act by thieves to steal fuel.
Friday’s inferno came amid a major crackdown by the López Obrador administration, whose strategy has included diverting flows away from the pipelines most heavily targeted by thieves, and transporting fuel by trucks.
But the logistical changes have slowed fuel deliveries across the country, causing shortages at many service stations and resulting in long lines of cars at stations.
Fuel theft has been a longstanding problem in Mexico that, until recent years, was mostly written off by the government as a business cost, analysts said. But the problem began to worsen about a decade ago as organized crime groups started to diversify their criminal enterprises, including adding fuel theft to their portfolios.
Soaring international fuel prices made the crime particularly attractive. The crime groups co-opted officials at all levels of government using bribery and violence, and won support among impoverished local populations with a steady supply of low-cost black-market fuel and offers of relatively lucrative employment as lookouts and fuel couriers.
Much of the theft occurs through taps drilled under the cover of darkness into pipelines that carry fuel from the nation’s ports and refineries to distribution centers across the country. Though much of the pipeline system runs underground, thieves operating in remote regions and doing quick work with shovels have been easily able to unearth the pipes. They have generally used high-powered drills to perforate the pipes, installing taps to siphon the fuel.
The problem has soared in recent years. During the first 10 months of last year, the authorities discovered more than 12,500 illegal taps — nearly double the number discovered in all of 2016 and more than 27 times the number a decade ago.
In a news conference on Saturday morning, Octavio Romero, the general director of Pemex, said that in the past three months, thieves had drilled at least 10 holes in the same pipeline that exploded on Friday, also causing fires.
“Oil theft does not only gravely affect our country’s economy,” Gov. Omar Fayad of Hidalgo said in an interview. “Today the state of Hidalgo is crying because of this tragedy, which has taken so many people’s lives. Such regrettable events should never happen again in Mexico.”
He announced on Saturday that the death toll had risen to 66 from 21 and suggested that the count could climb even higher.
“Many of the gravely wounded are battling between life and death,” he said.
The governor also appealed to the public to help the authorities curb the fuel-theft epidemic, calling on Mexicans “to help us fight this widespread phenomenon and to stay away from pipelines that have been seized or ruptured.”
Mr. López Obrador, who took office on Dec. 1, said about $3.14 billion in fuel had been drained from the system last year and sold on the black market. As part of the crackdown, he has deployed about 4,000 military and police personnel to guard the nation’s fuel infrastructure.