(CNN) -- Fog and light winds were helping contain a wildfire that had ravaged parts of Southern California and scorched nearly 9,000 acres, authorities said late Saturday.
Mandatory evacuation orders had been downgraded to warnings in some areas in Santa Barbara County and the blaze was 40 percent contained, officials said in a news release.
The fire, which started Tuesday, had destroyed or damaged about 80 homes and buildings. Nearly 50,000 people had been evacuated, and 18 firefighters had been injured, officials said.
Cool ocean breezes, increased humidity and lack of heavy winds helped tame the fire.
"All of those together really gave us the opportunity to get in there and make a difference," according to Fire Chief Tom Davis of Santa Barbara County, who said he thought more progress would be made by Sunday morning. The cause of the fire was unknown.
The blaze comes about six months after another wildfire -- the Tea Fire -- destroyed about 200 homes in the area.