IDYLLWILD, Calif. - A fast-moving wildfire - believed to have been sparked by arson - tore through trees, burned five homes and forced evacuation orders for an entire forest town as California sweltered under a heat wave and battled ferocious fires at both ends of the state.

The so-called Cranston Fire, which erupted Wednesday in the San Jacinto Mountains east of Los Angeles, turned into a wall of flame that torched timber and tinder-dry brush. In a matter of hours it grew to 19 square kilometres.

It was threatening an estimated 600 homes, authorities said.

The fire was the largest of at least five that police believe were purposely set Wednesday by a man whose car was reportedly spotted at the starting point of the blaze in Riverside County, officials said.

Brandon N. McGlover, 32, of Temecula was booked on suspicion of five counts of arson, state fire officials said. It wasn't clear whether he had an attorney.

Authorities ordered residents to leave Idyllwild and several neighbouring communities, home to about 12,000 people.

William Blodgett of Idyllwild said he couldn't get home because of the fire and had to wait along with others at a gas station in nearby Mountain Center - until the fire hopped a highway and began to move in his direction.

"We were all peeling out of there as fast as we could," he told KNBC-TV. "It was apocalyptic."

Horses and other animals were taken to shelters as were several hundred children who were evacuated from summer camps. About 200 were at a local high school serving as a shelter, KCAL-TV reported.

The fire in the San Bernardino National Forest sent up a cloud 50,000 feet high that was so enormous it created its own weather in the form of lightning, the National Weather Service reported.

Throughout the day, helicopters and planes dumped water and fire retardant that turned swathes of land and homes pink. Fire engines also were stationed to protect homes.

The fire is one of several across California amid a heat wave that has seen days of triple-digit temperatures.

To the north, in the San Francisco Bay Area, at least one home burned in a fast-moving blaze in Clayton, where houses are spread out around windy roads.

Yosemite Valley, the scenic heart of the national park, was closed at noon Wednesday during the height of tourist season as smoke cast a pall on the region from a fire in the Sierra Nevada. The closure was heartbreaking for travellers, many of whom mapped out their trips months in advance to hike and climb amid the spectacular views of cascading waterfalls and sheer rock faces.

"We had one guest who planned a weeklong trip," said Tom Lambert, who owns a vacation rental property near Yosemite Valley. "It was a father-daughter trip, for her high school graduation ... Now it's done. It's sad." Another guest had to delay plans to climb Half Dome.

Officials emphasized that Yosemite wasn't in imminent danger from the fire. Authorities decided on the shutdown to allow crews to perform protective measures such as burning away brush along roadways without having to deal with traffic in the park that welcomes 4 million visitors annually.

Yosemite Valley will be closed until at least Sunday, along with a winding, mountainous, 32-kilometre stretch of California's State Route 41 that leads into the area, Gediman said.

At least 1,000 campground and hotel bookings were cancelled - to say nothing of the impact on day visitors, park workers and small businesses along the highway, Gediman said.

The last time the 12-kilometre-long valley was closed because of fire was 1990, he said.

Over nearly two weeks, flames have churned through 155 square kilometres of timber in steep terrain of the Sierra Nevada just west of the park. The fire was just 25 per cent contained.

More than 3,300 firefighters are working the fire, aided by 16 helicopters. One firefighter was killed July 14, and six others have been injured.

In the state's far north, an 18-square-kilometre wildfire has forced the evacuation of French Gulch, a small Shasta County community that dates to the Gold Rush.

-----

AP reporters Robert Jablon, Michael Balsamo and John Antczak in Los Angeles contributed.