EVERETT - A tanker truck speeding through a traffic circle yesterday rolled over and spilled a 9,400-gallon river of burning gasoline into a residential neighborhood, flooding streets with flames, torching 21 cars, setting a pair of three-deckers ablaze, and sending panicked residents fleeing.

When the first firefighters arrived shortly before 2 a.m., they encountered a chaotic scene, as the 1,500-degree flames flowed from Sweetser Circle and down Main Street. Witnesses said the fire engulfed cars and leapt onto residential buildings. The burning gas backed up in storm drains and manholes.

"It looked like lava coming down Main Street," said Christopher Baro, 23, who tried to flee in his car before it became engulfed by the swiftly moving inferno and he escaped. "If we stayed in the car maybe 10 seconds more, me and my girlfriend would be dead."

At least 145 people had to be evacuated from nearby homes, which included an elderly housing complex. No one was injured, but at least 13 families were left homeless, Red Cross officials said.

Rescue workers and neighbors helped evacuate at least 85 elderly residents of a six-story apartment building at 66 Main St. Some walked and others left in wheelchairs. Other residents, including children swaddled in blankets and many in their pajamas, found shelter in MBTA buses brought to the scene.

"It looked like a war zone," said Everett Fire Chief David Butler, putting a "very rough estimate" of the damage at more than $2 million.

State Police cited Chad LaFrance, 30, of Dover, N.H., who drives for Abenaqui Carriers, a trucking firm headquartered in North Hampton, N.H., for speeding and not having in his possession a federal medical certificate, which would certify him as fit to drive, State Police said. They did not say how fast he was driving.

LaFrance has a record of traffic offenses. Police cited him for speeding three times in personal vehicles between 2000 and 2002 in New Hampshire, leaving him with $273.60 in fines, but his driver's license remained valid, according to the New Hampshire Division of Motor Vehicles.

Neither LaFrance nor officials of P. S. Marston Associates LLC, Abenaqui's parent company, returned calls yesterday. LaFrance left the scene with a company safety officer. Authorities said he was required, under federal law, to take a urine test.

Abenaqui, which employs 105 drivers to operate its 83 trucks, has a better-than-average safety record, according to the Federal Motor Carrier Safety Administration.

Over the past two years, federal inspectors cited about 13 percent of the company's vehicles as unfit for the road, while they found about 23 percent of vehicles throughout the industry unfit. In the same time, as inspectors found about 7 percent of drivers in the industry lacked the proper credentials to drive their vehicles, inspectors found all of Abenaqui's drivers had the proper credentials.

It was not clear yesterday the condition of the 1992 aluminum Heil trailer LaFrance was towing, or when it was last inspected.

LaFrance began his journey by filling up at Everett Terminal, where gasoline is stored in tanks for distribution in the region. It was not disclosed yesterday where he was headed, but as he rounded the Sweetser rotary in his 2007 Peterbilt tractor, he lost control and the rig tipped over.

State Police troopers, who got the first call at 1:41 a.m., found the truck on its side, its tank punctured, the vehicle consumed in flames. Fire officials and eyewitnesses said a spark - it was not known from what - ignited the leaking fuel as it flowed down a ramp and a grassy embankment toward Main Street.

"It was like a big orange ball of flame," said Ann Sowardos, who lives a few doors from the rotary and was awakened by the repeated explosions.

After flowing down the ramp, the 10-foot-wide wall of fire flowed left onto Main Street, engulfed at least a half-dozen cars in flames, and continued onto Spalding Street, where it ignited more cars in rapid succession.

Ragucci said firefighters evacuated elderly residents, attacked the fire on some cars, and poured water on the burning buildings, all at the same time. Massachusetts Port Authority firefighters helped douse the burning tanker truck with a fire-retardant foam designed for burning aircraft.

Ragucci attributed the lack of injuries to the crash involving just one vehicle, the early hour, and the ability of residents to escape mainly on their own.

The gasoline burned itself out shortly after the explosion, fire officials said, but the damage was already done. The burning cars generated massive amounts of heat, setting fire to a six-family building at 70 to 76 Main St. and to a three-story building at 80 Main St. The two buildings, gutted by fire, were demolished as safety hazards last night, officials said.

The building in between, 78 Main St., did not burn because it's farther from the street, but it sustained smoke and fire damage, officials said.

"It's like a miracle," Everett Building Inspector James Sheehan said of the building's survival.

Ziad Odeh, who owns two of the buildings, said he was relieved his tenants survived.

"This is one of the worst days of my life," he said.

A study of tanker accidents released this year by the Federal Motor Carrier Safety Administration found full tankers were more likely to tip because of their instability, and excessive speed was a common cause of the rollovers. In serious crashes, it found that tankers spilled their contents as much as 37 percent of the time, depending on the tank design.

The administration "has identified the need to study cargo tanks, from design through operation, to improve their roll stability," the report states.

Joe Delcambre, a spokesman for the US Department of Transportation's Pipeline and Hazardous Materials Safety Administration, which oversees tanker trucks, said federal standards require the tanker trucks be able to withstand a force of 155,000 pounds from the front, side, or rear. Trucks must be inspected and tested in intervals from six months to five years, depending on the type of the tank.

Lieutenant Governor Timothy Murray toured the scene and told reporters the Patrick administration will study the rotary. He said it is possible some of the administration's new highway bond bill money could be used to upgrade the circle. The governor, who is on a trade mission in China, expressed his concern in a statement.

"It's absolutely incredible that nobody was killed and nobody was injured," Murray said.

He said the state Department of Transitional Assistance would help displaced families find temporary housing. "We are going to work to help them in the short term secure housing and then help them get into a situation where they can rebuild their lives," he said.

State Senator Anthony Galluccio, a Democrat who represents Everett, described the scene as "something out of a movie. It looks like a bomb hit."

Prior to yesterday's rollover, State Police investigated 61 crashes at the rotary since Jan. 1, 2006. Only one other incident was a rollover, and that occurred in August 2006, when a Rhode Island man hauling liquid asphalt sped into the rotary and crashed near the same spot.

State Fire Marshal Stephen D. Coan said tanker rollovers are rare in Massachusetts. In 1999, a tanker rolled over and exploded on the Southeast Expressway behind Savin Hill and sent flames 100 feet into the air. Four months later, at least 500 gallons of gasoline spilled onto the Broadway Circle rotary in Revere when another tanker flipped.

"While such accidents are rare, the potential for catastrophic results are a real danger," Coan said.

State officials also worried about the impact on the environment.

Officials from the Departments of Environment Protection and Conservation and Recreation worked with environmental consultants hired by Abenaqui to check drainage lines for contamination, pump out storm drains, and install an absorbent material along waterways in the area, including the Malden River and a brook by the Westgate Mall, where they found a sheen of gasoline, said Joe Ferson, a spokesman for the Department of Environmental Protection.

"We hope to have the roads back to normal in a few days," said Rick Sullivan, commissioner of the Department of Conservation and Recreation. The traffic circle was expected to be open to traffic this morning.

Firefighters spent some 12 hours dousing all the flames.

For hours afterward, a strong smell of gasoline permeated the neighborhood.

As darkness fell last night, floodlights illuminated the area and a yellow crane named "Baby Britney" began tearing down the buildings, clawing its way through the remains of the cream-colored multistory house on the corner of Main and West streets.

"It's going to look a lot different around here, said Ron Savage, 37, who lives nearby on Elmwood Street.

All that remained of the tanker was a pile of charred steel.

Erin Ailworth, Megan Woolhouse, and David Butler of the Globe staff contributed to this report. David Abel can be reached at dabel@globe.com.