Firefighters are battling a fast-moving blaze which swept across a freeway in a Southern California mountain pass, destroying 20 vehicles and sending motorists running to safety before burning four buildings.

Fanned by hot desert winds, the wildfire started in the Cajon Pass along Interstate 15 - the main highway between Southern California and Las Vegas - and spread quickly to 3,500 acres.

Hundreds of firefighters, aided by water-dropping aircraft, have contained five per cent of the blaze.

Strong winds spread the fire to the rural community of Baldy Mesa, where it burned at least five homes and threatened about 50 more.

California is in the midst of severe drought, and wildfires are common. Some break out near freeways, but it is very unusual to have vehicles caught in the flames.

Dozens of vehicles were abandoned and hundreds of others turned on to side roads to get away from the flames as water-dropping helicopters flew over the Cajon Pass area about 55 miles north east of Los Angeles.

Motorists stuck on the road described a harrowing scene.

"It's crazy, you're watching black clouds and white clouds of smoke, there's a ridgeline off to my right ... and it looks like any second flames will come over the ridgeline," Chris Patterson, 43, said.

It is not uncommon for wildfires to reach freeways in California but it was unclear why dozens of cars were caught along Interstate 15, forcing frightened people to flee on foot.

US Forest Service spokesman Uriah Hernandez said no injuries had been confirmed.

The agency said the fire had burned at least 3, 500 acres and was threatening the rural community of Baldy Mesa.

San Bernardino County Fire service said at least five homes were burned and another 50 were threatened by the flames. An additional 10 cars on the freeway were damaged by the fire.

Melissa Atalla said she could see the flames from her petrol station in Baldy Mesa.

"People are spectating from our parking lot, running around getting water and beer. It's chaos," she said. "One man came in and said, 'Oh my, my house is getting burned'."

The fire led authorities to shut several freeway lanes, causing traffic to back up for miles. California Highway Patrol spokesman Steve Carapia said 50 to 75 vehicles were left abandoned.

Raquel Martinez, 34, was traveling to Las Vegas with her husband for the weekend when they got stuck in northbound traffic on the I-15 for about an hour.

The sky darkened to black. As they drove by, cars were covered in "pink powder" - fire retardant. Cars meanwhile were being redirected up narrow twisty emergency lanes from the southbound side headed north.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.