LAFAYETTE -- A truck carrying nine vehicles caught fire on westbound Highway 24 early Thursday, snarling traffic for miles, authorities said.

The truck's driver escaped without injuries from the 4:49 a.m. blaze just east of the Central Lafayette exit, according to the California Highway Patrol.

Traffic was still backed up past Walnut Creek as of 9 a.m. as crews cleaned up the debris from the fire.

The driver of the truck was shaken but uninjured, CHP spokesman John Fransen said. A fire that spread to nearby shrubbery also was extinguished, a Contra Costa Fire District dispatcher said.

The cause of the blaze is under investigation, Fransen said. The driver was hauling nine Chrysler sedans and was going west on Highway 24 when he heard a loud bang, Fransen said.

"He heard the bang and thought something had happened to one of the cars on the truck," Fransen said. "So he pulled over the shoulder, and that's when he noticed the truck was on fire."

The fire gutted seven of the nine cars aboard the truck, Fransen said. It was not known immediately where the cars were headed.

Contra Costa Fire District units knocked down the fire by 5:28 a.m. and declared it under control at 5:41 a.m., a dispatcher said. The CHP closed all but one of five westbound lanes of Highway 24 for more than an hour, creating a traffic backup that extended past Treat Boulevard in Concord. By 9 a.m., all but the far right lane were opened, but traffic was still moving slowly.

Contact Rick Hurd at 925-945-4789 and follow him at Twitter.com/3rdERH.