Thousands of residents returned home Thursday, thankful that an erratic, fast-moving wildfire fanned by high winds in Boulder County spared all but two houses.

Crews had fully contained a 3,700-acre fire zone about 25 miles northwest of Denver by late Thursday, but about 20 firefighters monitored the site overnight to suppress flare-ups.

They called the lack of casualties and significant property damage nothing short of a miracle.

At least 1,300 homes were evacuated Wednesday, and two were destroyed, said Sheriff's Cmdr. Phil West. The evacuation order for all homes was also lifted Thursday evening.

"I'm shaking and I'm so grateful we have our homes and our pets," said Darlene Steiner, a resident of the Lake Valley Estates neighborhood north of Boulder, as she chatted with neighbors outside her home following an overnight evacuation that affected an estimated 3,000 people.

Click here for photos.

The fire blackened mostly grassland north and west of the city of Boulder, an area of scattered subdivisions, farms and ranches along the foothills of the Rocky Mountains.

Among the evacuees was Michael Brown, the former director of the Federal Emergency Management Agency who was harshly criticized for FEMA's response to Hurricane Katrina.

Brown said his reaction to the evacuation order was automatic.

"No question in my mind," he told The Associated Press. "I didn't ask how far the fire was. They said it was mandatory."

West estimated that within the 3,700-acre fire zone, about 1,400 acres had actually burned.

Two firefighters and a police officer sustained minor injuries.

Fire crews lit backfires overnight to starve the blaze, and they saved several homes, said county Sheriff Joe Pelle.

"The fact that no one was killed or seriously injured and the fact that we lost two homes in a wind-driven event like this is miraculous," Pelle said. "The effort to suppress this wildfire once the winds died down last night was exhausting and downright heroic."

Garry Briese, the Denver-based regional director for FEMA, also credited years of work to protect neighborhoods by outlawing wood shingles and encouraging homeowners to keep flammable landscaping away from their homes.

"It was an overnight miracle that was 15 years in the making," said Briese, a former president of the International Association of Fire Chiefs.

The cause of the fire was under investigation, though officials believed wind gusts reaching 80 mph likely downed power lines. Utility company Xcel Energy said 2,500 customers briefly lost power in the Denver metro area that includes Boulder because of high winds.

Firefighters thought they had a handle on the fire late Wednesday before wind gusts pushed flames across containment lines and toward two rural neighborhoods, forcing a late round of evacuations. Crews suppressed hot spots Thursday and hoped to call in a water-dropping helicopter, winds permitting. Utility workers canvassed the area, inspecting power lines and poles.

Few residents took advantage of two shelters opened for evacuees, choosing instead to stay with family and friends. The Federal Emergency Management Agency said it had agreed to help pay for 75 percent of the state's firefighting costs.

The acrid smell of smoke hung in the air as residents — including horse and llama owners — returned home and brought their animals back to stable.

Christy Cramer, a horse trainer, spent six hours Wednesday evacuating 42 horses from the Joder Ranch.

"I called all of my friends with big horse trailers," Cramer said. "The flames were right next to my truck. It was very, very, very scary."

Seven horses were found safe at the ranch Thursday, Cramer said: "One was standing in one of the burned pens, waiting for someone to help."

Neighbors helped Bobra Goldsmith, 78, round up more than 160 llamas and alpacas on her Rocky Mountain Llamas ranch. The retired University of Colorado French and music professor lost her house in the fire.

"My mother was an artist," Goldsmith told the Camera newspaper. "The house was filled with her work. I can't tell you what I've lost."

Fire swept through a wire fence and consumed parts of Fred Smith's yard in the Lake Valley Estates neighborhood. It scorched juniper trees and burned holes in the floor of his wooden gazebo — but his house was spared.

Nearby, two yellow nylon ropes, their ends singed, swung in the wind — the remains of a children's swing set. A small, orange plastic seat lay on the ground.

Gusty winds buffeted Smith as he gazed across a valley of charred grass and the foothills beyond.

"We're used to the winds out here," he said. "It's a constant force. You just have to get used to it."