The wildfire that has scorched 13 square miles and destroyed dozens of homes in the hills above this scenic coastal city was apparently sparked by a power tool being used to clear brush, investigators said Sunday.

Fire officials said someone, or possibly a group of people, was clearing vegetation on what appeared to be private land near a trail around the time the fire erupted Tuesday.

"Any time you use any power tool, there's always a possibility, especially if the conditions are right," said Joe Waterman, the overall fire commander from the California Department of Forestry and Fire Protection.

Click here for photos.

Some Santa Barbara County residents recently received annual notices advising them they had until June 1 to clear potentially hazardous brush, county fire Capt. Glenn Fidler said.

It was not immediately clear whether the blaze originated in an area targeted by such a notice.

Officials declined to comment further about the type of power tool that may have been used, or if anyone could face charges.

The fire has destroyed 31 homes, damaged 47 others and forced the evacuation of approximately 30,000 people to safer ground.

All but approximately 350 evacuees had been allowed to return home Sunday, as firefighters had the blaze 55 percent contained, aided by cooler, more humid weather.

Relieved to see their homes still standing, grateful residents paid tribute to firefighters by tooting car horns in their honor and posting large thank-you signs on their front lawns.

More than 4,500 firefighters worked to contain as much of the blaze as they could before the hot, dry "sundowner" winds that pushed flames on homes earlier in the week return, possibly as early as Tuesday.

Fire officials over the weekend had lauded residents' removal of brush and fire-prone plants from their properties to bolster the defensible space needed to protect a house from a wildfire and keep firefighters safe while working in the region.

Santa Barbara County Fire Chief Tom Franklin recalled that a 1990 blaze took out 500 homes, although it did not burn across as wide a swatch of land as the 13 square miles covered by this week's fire.

"More homes would have burned had they not done their defensible space work," Franklin said of the residents who gave firefighters the best conditions to work in.

Richard Martin, a 73-year old retired University of California, Santa Barbara, chemistry professor, rode out the worst of the firestorm from a five-by-seven-foot concrete bunker he built to store important documents.

Martin and his wife, Penny, ducked in and out of the bunker to battle spot fires on the oak trees surrounding their four-level home tucked away near the Botanic Garden. But he also credited rooftop sprinklers, clearing brush and planting low, fire resistant plants around the edge of his home with its survival.

"All the trees the leaves are all dead because they've been scorched," Martin said, pointing out the glass door of his wooden deck. "But those plants haven't been scorched. They look normal."

In 2005, California extended the required clearance around homes in an effort to bolster the defensible space needed to protect a house from a wildfire and keep firefighters safe while working in the region.

In Santa Barbara County, officials can also clear brush from unkempt property and charge homeowners for doing so. Franklin said they usually need to enforce that regulation on no more than a couple of homes a year.

Firefighters say they are more likely to hunker down and try to save a home that has good defensible space because they have a better and safer shot at getting a handle on the blaze.

In recent years, many residents have gotten rid of more volatile plant life, replacing it with fire-resistant gardens or just clearing it out entirely. Some have built fire safety into the construction of the homes themselves.

Click here for more from MyFOXLA.com.