A gas pipeline in the Mexican state of Hidalgo exploded on Friday night, killing at least 21 people in a blast the authorities said was caused by an illegal tap used to steal fuel.Omar Fayad, the governor of Hidalgo, said on Twitter that more than 70 others were injured in the explosion in Tlahuelilpan, a town about 80 miles north of Mexico City.The state-run energy company, Pemex, said that the explosion was caused by an illegal fuel tap at the Tuxpan-Tula pipeline.[The death toll soars as officials begin an in-depth examination.]The country has been plagued by fuel thefts, and Mr. Fayad called on Mexicans “not to be accomplices.” He said the practice was not only illegal, but it also “puts your life and families at risk.”“What happened today in Tlahuelilpan should not happen again,” he wrote.Video circulating on social media showed a huge fire spread across a field, with people silhouetted against the flames and dark smoke behind them. A pillar of fire rose into the night, the lights of emergency vehicles reflected in smoke.President Andrés Manuel López Obrador said on Twitter that he had “called on the whole government to provide assistance to the people at the site.” The authorities said that they had sent ambulances, medical specialists and other personnel, and that burn victims were being transferred to hospitals in Mexico City.Mexico is in the midst of a gas crisis, with shortages in and around the capital, long lines at stations around the country and criminal gangs known as huachicoleros siphoning gasoline from pipelines to resell it. Mr. López Obrador has made it a priority to stop the gangs, saying that the market for cheap stolen fuel cost the government some 60 billion pesos, or $3.14 billion last year.The illegal taps can be dangerous. Twenty-seven people were killed when a pipeline exploded in central Puebla State in 2010. Dozens of people were also injured and homes were destroyed.Mr. López Obrador has tried to crack down on thieves, shutting off pipelines thought vulnerable, diverting gasoline to tanker trucks, and ordering 4,000 military and police personnel to guard stretches of pipeline. The new transportation methods have caused delays in getting gasoline to service stations, according to Pemex.Last week, the pipeline that runs from the coastal city of Tuxpan to Mexico City was sabotaged in retaliation for government’s new measures, the president said.Mr. López Obrador had blamed the thefts, in part, on the “incompetence or complacency” of local authorities, and has maintained that his tactics have reduced the amount of fuel stolen.“I have said it before, and I’ll say it again: Let’s see who gets tired first, because we will stop the fuel theft,” he said.