ECATEPEC, Mexico, May 7, 2013 (AFP) - A gas tanker exploded on a highway in a Mexico City suburb on Tuesday, killing at least 20 people and wounding dozens more as nearby homes and cars burst into flames.

The blast rocked a modest neighborhood of Ecatepec, north of the capital, in the early hours of the day, injuring at least 36 people, including eight children, and damaging some 15 cars and 40 homes, officials said.

Authorities warned that the death toll could still rise.

Nearby buildings, cars and trucks caught fire after the tanker exploded before sunrise in the community of San Pedro Xalostoc, which is part of the municipality of Ecatepec.

Several sheep, rabbits and dogs belonging to residents lay dead around the neighborhood.

One of the truck's two cisterns flew off the highway, landing on a patio between two homes, an AFP reporter said.

The first tanker was still attached to the cab of the truck on the road, and authorities were pumping gas out of it to prevent another disaster. Officials were investigating the cause of the accident.

A couple and their two children were killed when the loose tanker landed near their home, according to the father's cousin.

"I ran out and took refuge on nearby roads after I heard the thunderclap," 45-year-old Humberto Zedillo told AFP.

"I saw the house of my relatives in flames and when I returned the forensic experts were removing the bodies of my relatives."

Firefighters sifted the rubble for any more victims after the blast left behind the charred remains of vehicles, flung road cement barriers off the highway and sent smoke billowing from buildings.

"We have 20 people who lost their lives and 36 who were hospitalized," Mexico state's top prosecutor Miguel Angel Contreras told Formato 21 radio. "We are not ruling out that more (bodies) could be in the rubble."

The driver survived the accident and was "detained in a hospital where he is receiving medical treatment," Mexico state public safety secretary Salvador Neme wrote on Twitter.

Neme said 13 people were in serious condition. Officials initially reported nine deaths before the toll rose throughout the morning. The highway was partially reopened hours after the accident.

The truck, belonging to a company named Termogas, was traveling on a highway linking Mexico City to the central city of Pachuca when it exploded at around 5:30 am (1030 GMT).

President Enrique Pena Nieto expressed his condolences to the families of the victims and ordered his government to take measures to improve safety around the highway.

The roads of the metropolis are notoriously congested.

More than 24,000 people die in road accidents in Mexico each year, according to official figures, and experts have warned of the dangers posed by trucks carrying hazardous materials.

Trucks carrying dangerous substances were involved in almost 1,200 collisions between 2006 and 2009, killing 196 people and injuring 838 others, according to a study by the state-affiliated Mexican Transport Institute.

In April last year, 43 people died in the eastern state of Veracruz when a double-trailer truck lost its rear trailer and slammed into a bus packed with farmers.

It is also only the latest deadly gas or oil incident to rattle Mexico.

On January 31, a gas build-up sparked a huge explosion in the Mexico City headquarters of state-owned energy giant Pemex, killing 37 people and injuring more than 120.

In September, an huge explosion killed 30 people at a gas facility near the US border.