Thousands of people driven from their homes in the hills northwest of Los Angeles were allowed to return Sunday night after crews working in steep canyons took advantage of cooler temperatures and calmer winds to beat back a brush fire.

The fire near the prosperous and semi-rural neighborhoods of Calabasas was 80 percent contained by sunset — up from 30 percent at daybreak.

Firefighters using aircraft made water drops along the eastern and southern edges of the blaze, which was held to just over 500 acres, Los Angeles County Deputy Fire Chief John Tripp said.

He said the fire was hung up on the mid-slope of steep canyons, making a direct attack difficult.

"The fire was not down against a road, it was up against a cliff," Tripp said. "So firefighters had to hike up."

All the evacuations, most of them in Calabasas but some in nearby Topanga, were canceled starting at 6 p.m.

At the height of the fire, about 3,000 homes were threatened and about 5,000 residents were under evacuation orders. It was sparked by a car crash that downed power lines.

The fire destroyed one commercial building, Tripp said. Officials had previously said three homes had been damaged, but closer examination as the fire calmed showed that was not the case, he said.

Fifty-foot-high flames erupted on ridges, and embers turned trees into torches Saturday afternoon. The fire flared as Southern California sweltered under temperatures that hit the 90s in many places.

Flames raced through drought-dry brush and came within yards of million-dollar homes. The smoke could be seen across the region, and a dusting of ash rained down on neighborhoods more than 30 miles away.

Some horse owners in the area put the animals in trailers and hauled them away. Authorities set up an evacuation center for people with large animals at Pierce College in Woodland Hills.

More than 500 firefighters, aided by bulldozers and water-dropping helicopters, were on the scene, but the numbers were decreasing by the end of Sunday.

To the southeast, a smoky wildfire burning in Riverside County was 30 percent contained Sunday. The blaze that broke out a day earlier along Interstate 15 in Temecula charred about 130 acres of dry brush. No structures were threatened.

To the north in Monterey County, a wildfire that has charred 3,500 acres of grass and brush in the Los Padres National Forest has prompted evacuations and is threatening numerous structures.

The U.S. Forest Service says about 400 firefighters are battling the blaze Sunday on land and by air with air tankers and helicopters. The fire started Saturday afternoon west of King City.