Updated

Fading desert winds and a stream of humid ocean air helped firefighters gain ground on a 23,970-acre wildfire, allowing hundreds of residents to return home to the hills and canyons outside the city.

Gov. Arnold Schwarzenegger (search) praised the nearly 3,000 firefighters who were fighting the blaze, which was 40 percent contained early Saturday. At its peak, the fire had threatened thousands of houses.

"How well they coordinated everything here is spectacular," Schwarzenegger said Friday after flying over the charred landscape.

Although the fire along the Los Angeles-Ventura county (search) line was weakening, a shift in wind was pushing smoke over parts of Los Angeles and neighboring valleys.

Health officials urged residents to restrict outdoor activities and advised people with heart and lung diseases to take precautions.

Downtown Los Angeles (search) bank employee Jolie Gorchov, 40, said the bad air was giving her headaches. "I don't close my windows because it doesn't make a difference," she said. "The air is so thick and smoky you can taste it."

Despite the fire's furious pace over the previous two days, the flames destroyed only two single-family homes, three outbuildings, one storage building and one detached garage, authorities said.

The fire erupted Wednesday afternoon in the Chatsworth area of northwest Los Angeles and was rapidly spread by strong winds.

Elsewhere, 1,200 people were evacuated from mountain communities 70 miles east of Los Angeles because of a 450-acre blaze in the San Bernardino National Forest. Containment was estimated at 10 percent.

A small fire slumbering in hills above suburban Burbank also awakened, sending up a towering plume. Residents were urged to leave 70 homes there.