Read more about this story from CNN affiliate KSTU.
(CNN) -- Authorities expressed optimism Monday they have gotten a handle on a wildfire burning near Herriman, Utah, after battling the flames overnight.
Flames have been "suppressed in significant fashion," Utah Gov. Gary Herbert told reporters Monday.
Herbert said when he left the fire scene, about 30 miles south of Salt Lake City, on Sunday night, he feared up to 100 homes might be lost. The fact that only four were destroyed is "remarkable," he said. "In fact, it's a miracle."
Weather conditions turned in firefighters' favor about 3:30 a.m. Monday, as temperatures dropped and winds turned, said Michael Jensen, chief of the Unified Fire Authority.
The fire, dubbed the Machine Gun Fire, has left a "footprint" of about 10,000 acres, he said. Evacuation orders for about 5,000 people in about 1,600 households were still in place, and authorities said factors including the weather would determine when the orders would be lifted.
"We're not out of the woods yet," Jensen cautioned, adding it remains to be seen what would happen when temperatures rise and winds pick up Monday.
But, the governor said, "today looks very good for us to get this fire out today." Jensen said the goal is to contain the blaze as much as possible in developed areas.
About 150 firefighters worked through the night into Monday morning trying to outmaneuver the flames while evacuees huddled in a nearby high school, wondering if they would have homes to return to.
"In the night, it's difficult to fight fire in this type of terrain," said Capt. Brad Taylor, spokesman for the Unified Fire Authority. "Our guys can't see where their escape routes are set up for, and obviously life safety is our number one issue for our firefighters and for the residents. So, with the wind kicking up, and not seeing much of the terrain, we basically stuck most of our tactics along the residential lines and running the bulldozer lines to make a fire break."
Earlier, Taylor said the fire had consumed 3,500 acres overnight.
Officials heaped praise on the firefighters on Monday, crediting them with saving many homes. Bulldozers "made a tremendous difference on the eastern flank of the fire," Jensen said.
Jensen said he did not have a containment percentage for the fire as of Monday morning. Flames got as close as 30 feet to some of the homes, he said. Active fire remained in some locations, he added.
Herbert expressed sympathies for residents of the four homes that were lost. He said hopefully the loss will be covered by insurance, although some state agencies will be able to offer aid.
Herriman City Councilman Mike Day's family was one of those that fled the encroaching flames.
"I saw a wall of fire coming down the hill rapidly. My kids were scared and we loaded them up and evacuated and my family's safe. And I went around and told my neighbors, 'Let's get out of here,' Day told CNN affiliate KSL on Monday. "But as that wall was coming down -- that wall of fire -- you feel it. It's an interesting feeling to see that coming down. But if you're going to have a fire in your home, what better way than to have a couple of hours to prepare."
Taylor said winds exacerbated the fire, which was apparently sparked Sunday by ammunition fired by Utah National Guardsmen at nearby Camp Williams.
"Had it not been for the winds gusting up to 50 mph, this wouldn't be an issue and we wouldn't be here this morning," Taylor said.
"These fires are an occurrence that happens occasionally with training," Utah National Guard spokesman Lt. Col. Hank McIntyre said Monday. "That's why we have crews on site."
McIntyre said the on-base firefighters thought they had extinguished the brush fire started during the training exercise, but then winds resuscitated the flames.
The blaze marched north through an artillery impact area containing some potentially unexploded ordnance, that, if heated, could explode, so it was too risky for the firefighters to chase the flames into that area, he said.
McIntire said the Guard followed proper protocol and the winds were not excessive until after the fire started. But Jackie Burns, a long-time resident, told CNN affiliate KSTU that's not the case.
"Every year, for years, they set that mountain on fire and it's never come that close to Herriman," Burns said. "But so many times over 34 years though, we have watched and just waited to see fire coming over the ridge and thought we'd get out. And it finally happened. I can't believe it's finally did it. And for them to say they checked the weather conditions is baloney, because it was a hot, dry wind last night. It's blown all week out here. It was blowing this morning. So they are full of baloney when they said they checked the wind conditions."
The weather may not give fire fighters much help Monday. The National Weather Service has issued a "red flag warning" for much of Utah, Colorado, and Wyoming, and western South Dakota and Nebraska. Relative humidity is expected to dip below 10 percent, and wind gusts will approach 40 miles per hour, with dry, windy conditions expected to continue through Tuesday.
Dozens of evacuees went to Herriman High School, where the Red Cross had set up cots and was providing food and water, Herriman city spokeswoman Nicole Martin said.
Not everyone who was asked to evacuate complied. But Lt. Don Hutson of the Unified Police Department said after negotiations, most residents left their homes, and authorities wouldn't use force to coerce those remaining to evacuate.
"We're not going to get in the position where we'll be dragging people out of their homes. That's not what we want to do," Hutson said. "Often times, it's difficult to leave your home. I mean, that's not what you want to do. It's inconvenient. But we're about saving lives and we're going to do whatever we can to do that and we encourage them in any way we can to try to leave the area. But when push comes to shove, we're not going to drag people or arrest them for not leaving."
Herriman Mayor Joshua Mills said about 350 people in total were working on the fire response. That includes about 40 National Guardsmen helping to fight the fire, secure houses and control traffic, with 80 more Guardsmen on standby, McIntyre said.
"This is truly a team effort," said Brian Hyer, from the Utah Department of Public Safety.
Salt Lake County Mayor Peter Corroon said Monday that both the city of Herriman and Salt Lake County have declared states of emergency.
The state of Utah has not made such a declaration, according to Herbert's spokeswoman Angie Welling.
Herbert said the federal government has approved funding 75 percent of firefighting costs.
Taylor said two firefighters have been injured on the job. One was stitched up and returned to the fire lines, while the other was sent home to recover, he said.
Herbert flew over the fire Monday morning at daybreak, when he could get what Welling called "the first good aerial view of the fire."
CNN's Rick Martin and Greg Morrison contributed to this report