A gas tanker exploded in a Mexico City suburb on Tuesday, killing at least 18 people, wounding 36 others and damaging several homes and cars, an official said.

The blast rocked a neighborhood of Ecatepec, north of the Mexican capital, in the early hours of the day, affecting 15 cars and 20 homes, said Salvador Neme, the public safety secretary for the state of Mexico.

"The number is updated to 18 people dead and 36 wounded in the emergency in Ecatepec," Neme wrote on Twitter, after initially reporting nine deaths and 13 injuries.

The truck was traveling on a highway linking Mexico City to the central city of Pachuca.

Television images showed charred vehicles on a highway, road cement barriers thrown to the side and buildings in smoke as firefighters and rescue workers sifted through the damage.