Crews spent the day cutting fire lines while battling erratic winds. Helicopters and air tankers, which were briefly grounded due to the weather, dropped water and retardant on the blaze, which doubled overnight to 3,500 acres.
Flames, chewing through chaparral and timber, advanced within a quarter-mile of the mountain resort community of Wrightwood, which was under mandatory evacuation. By Sunday afternoon, firefighters were cautiously optimistic about keeping the fire at bay.
"Firefighters have been able to beat the flames back," said John Miller, a spokesman for the U.S. Forest Service.
Miller stressed that the fight was far from over. Firefighters had to contend with shifting winds, which gusted up to 50 mph and occasionally dropping to zero.
The so-called Sheep fire destroyed three homes in remote canyons and was 10 percent surrounded.
Between 4,000 to 6,000 residents were ordered to evacuate, said Robin Prince, public information officer for the San Bernardino National Forest.
"The winds are quite a problem," Prince said.
Gov. Arnold Schwarzenegger declared a state of emergency for San Bernardino County, freeing up state resources to battle the fire.
Erratic winds and low visibility temporarily grounded air support, but helicopters and air tankers took to the skies by Sunday morning aided by about 1,000 firefighters on the ground, some spraying fire retardant gel to structures.
The blaze broke out Saturday afternoon near Lytle Creek, a small community surrounded by the San Bernardino National Forest. Fueled by thick timber and brush, the fire pushed over hills and canyons by fast-moving winds.
Evacuation centers were set up at a high school in nearby Rialto and at the Victorville Fairgrounds.
The cause of the fire was under investigation.
In Arizona, some residents of the city of Williams remained away from their homes for another day as a prescribed burn that grew out of control threatened the town known as the "Gateway to the Grand Canyon."
Punky Moore, a Kaibab National Forest spokeswoman, said the Twin Fire scorched about 1,000 acres, or more than 1 1/2 square miles, by Sunday morning. It was burning forest undergrowth and ponderosa pines on Bill Williams Mountain.