"It was thunderous sound. I thought we were all going to die," said Rita Enriquez, 42, a housewife who lives nearby. "When we ran out, we saw a car on fire and flames everywhere. Smoke was pouring all over the freeway."
Mario Lopez, 43, a mechanic, lives in the house hit by the tank and managed to escape with his three sons after being awakened by the blast.
"All the windows broke to the inside. We got down and left crawling," said Lopez, who lost a brother, a sister, three nephews and a sister-in-law who all lived in separate units of the three-story home. He said 12 people in all died in the house. "Everything was in flames," he said.
Enriquez said five of her relatives were gravely injured in their concrete slab home along the road, though she had no other details as she waited for word outside Magdalena Las Salinas Hospital in Mexico City.
Her 15-year-old niece, Wendy Garrido, who was pregnant, was forced to give birth after the explosion, she said. They survived but both were in intensive care, Health Secretary Cesar Gomez said.
The pre-dawn disaster exposed two recurrent public safety issues in Mexico: extremely heavy trucks that are frequently involved in serious accidents, and the construction of improvised homes just feet away from major highways.
Some of the cinderblock homes hit by the huge explosion were just steps from the busy, eight-lane highway. Other homes were mere shacks, built of sheet tin.
Lopez said the highway recently had been widened, bringing traffic perilously closer to their dwellings.
"They never thought a car could hit them or an explosion of this magnitude," said Maribel Juarez, the cousin of another family killed in the explosion. "Now we have to bury their coffins and our family members are never going to return."
The driver, Juan Olivares, 36, was heading south from the city of Pachuca to Mexico City in a tractor that was hauling two gas tanks on tandem trailers, said Jose Luis Cervantes, an assistant state prosecutor. He said the vehicle belonged to the Termogas company.
Cervantes said the tractor hit a center divider and broke apart, with one tank flying into a house and exploding, killing 15 people, and another part of a tank hitting a separate house, killing four.
State security officials counted 33 people with various injuries.
The driver, who was under detention while being treated at a hospital, could face manslaughter and property damage charges, the prosecutor said.
"We just pulled burned people, and put out the fire in the houses, but we don't really know what happened," said Rogelio Martinez, a resident.
Emergency personnel at the scene pulled dead from their homes, some apparently burned in their beds. An Associated Press journalist saw rescue workers carry three bodies, covered with white sheets, from one home.
One small passenger van had been totally gutted by flames and tossed against the wall of one of the many improvised houses next to the highway.
Hundreds of police, ambulance drivers, paramedics, soldiers and firefighters gathered at the scene.
Pablo Bedolla, the mayor of Ecatepec, a mainly working-class area, said 20 homes and one school had been damaged by the blast. The explosion happened before class hours, so there were no apparent injuries in the school.
"People are very shaken, above all because of the injuries and the large number of dead," Bedolla said. "I've spoken with the families of the victims, and they are just sobbing."
The explosion closed the highway between Mexico City and Pachuca for hours.
Speaking in Mexico City, President Enrique Pena Nieto suggested something would have to be done to separate major highways from poor neighborhoods.
"I have instructed the Transportation Department ... to review the safety conditions on this federal highway in places where structures have been built on the right of way, so that in the near future, work can be carried out to make it safer," Pena Nieto said.
Often in Mexico, squatters settle on rights of way, the strips of land on either side of a highway or railway line that are intended to be buffer zones. The gradual spread of shacks creates neighborhoods that are inherently unsafe.
This highway, however, was recently expanded, so it was unclear whether the land occupied by homes was legally settled.
The Mexican government also appears to have realized it has a big problem with over-weight trucks. Such trucks, often unsafely operated, have been involved in a number of spectacular, deadly accidents in recent years.
On Tuesday, the Transportation Department announced it had set up a panel of experts to study the issue of maximum allowable weights, "to set out opinions on eventually changing the weight standards, or drawing up a new set of rules."
One year ago, the Mexican government announced measures to tighten inspections and lower maximum allowed weights for some freight trucks after protests over a string of deadly accidents involving double-trailer trucks like the one involved in Tuesday' disaster.
Mexico has allowed trucks to travel highways with loads of up to 80 metric tons and lengths exceeding 100 feet, compared to a U.S. limit of 80,000 pounds, or 40 tons, on interstate highways.
In April 2012, a double-trailer truck on a two-lane road in the Gulf coast state of Veracruz lost its rear trailer, which slammed into a bus carrying farm workers, killing 43 people.
Associated Press writers Mark Stevenson and Gloria Perez contributed to this report.