At least 21 people have been killed and more than 70 others injured after a fiery explosion at a pipeline leaking fuel in central Mexico.

Locals were collecting the spilling petrol in buckets and rubbish bins when the fuel ignited on Friday, officials said.

The leak was caused by an illegal tap that fuel thieves had drilled into the pipeline in a small town in the state of Hidalgo, about 62 miles north of Mexico City, according to state oil company Petroleos Mexicanos (Pemex).

Video footage showed dozens of residents near the town of Tlahuelilpan gathered to collect spilled fuel in buckets, garbage cans and other vessels.

It appeared an almost festive atmosphere as whole families gathered in a field as a geyser of fuel spouted dozens of feet into the air from the tap.

Footage then showed flames shooting high into the air against a night sky and the pipeline ablaze while screams could be heard.

Hidalgo governor Omar Fayad said 21 people were killed immediately and 71 suffered burns in the blast at the duct that carries fuel —apparently petrol — from the Gulf coast to Tula, a city just north of Mexico City.

“Caring for the wounded is our top priority,” Mr Fayad said.

Pemex attributed the blaze to “the manipulation of an illegal tap”.

President Andres Manuel Lopez Obrador has declared an offensive against fuel theft and the blast will further focus attention on the 3 billion dollar (£2.33bn) per-year illegal industry.

“I greatly lament the grave situation Tlahuelilpan is suffering because of the explosion of the duct,” Mr Lopez Obrador tweeted. He called on all branches of government to assist the victims.

Mexico pipeline fire
Scene of the blast in Tlahuelilpan, Hidalgo state, Mexico (Secretary of National Defense via AP)

Hidalgo state police said the leak was first reported at about 5pm local time.

“There was a report that residents were on the scene trying to obtain fuel,” according to a police report. Two hours later, the pipeline burst into flames.

And another pipeline burst into flames in the neighbouring state of Queretaro, because of another illegal tap. Pemex said the fire near the city of San Juan del Rio “is in an unpopulated area and there is no risk to human beings”.

It is not the first time such an accidents have occurred.

In December 2010, authorities blamed oil thieves for a pipeline explosion in a central Mexico near the capital that killed 28 people, including 13 children.

That blast burned people and scorched homes, affecting 5,000 residents in an area six miles wide in San Martin Texmelucan.

Lopez Obrador launched an offensive against fuel theft after taking office December 1.

Thieves drilled about 12,581 illegal taps in the first 10 months of 2018 and the country has deployed 3,200 marines to guard pipelines and refineries.

The new administration has also shut down pipelines to detect and deter illegal taps, relying more on delivering fuel by tanker truck. But there are not enough trucks, and long lines at gas stations have plagued several states.

However, fuel theft gangs have been able to win the loyalty of whole neighbourhoods, using free gas and getting local residents to act as lookouts and confront military patrols carrying out raids against the thefts.

It is unclear whether Friday’s tragedy would turn the tide of opinion against the gangs in the impoverished villages that lie above the underground pipelines.

“I am calling on the entire population not to be accomplices to fuel theft,” Mr Fayad wrote. “What happened today in Tlahuelilpan must never happen again.”