COLORADO SPRINGS, Colo. — Firefighters trying to stop a monstrous wildfire outside Colorado Springs on Saturday worked to expand containment lines and lift evacuation orders for thousands of anxious residents in the most destructive blaze in state history, which has destroyed nearly 500 homes and killed two people.

“I think if you look at it as a fight, we got our tails kicked for a couple of days,” said El Paso County Sheriff Terry Maketa. He called Thursday a “draw,” then gave what’s been one of the most optimistic updates since the wildfire exploded this week. “I think today we delivered some blows, and we’ve got some good news to give out.”

Aided by a surprise rain shower and slower fire movement, crews increased containment to 30 percent, up from 5 percent the previous day. That meant evacuation orders could be lifted for neighborhoods east, north and west of the fire — areas where as many as 5,000 people live, Maketa said.

The fire began Tuesday during record-setting heat and tinder-dry conditions. Officials have warned it still could flare up again if the weather shifts. So far, 473 homes have been destroyed.

Crews say they were better prepared to take on the flames because of lessons learned fighting last year’s Waldo Canyon Fire, a similarly devastating blaze that devoured hundreds of homes and killed two people only a few miles away.

When the Black Forest, a thickly wooded rural region north of Colorado Springs, began to burn, authorities swiftly evacuated tens of thousands of people from an area larger than the Denver metropolitan area.

They immediately began hand-counting destroyed houses to get information out to homeowners. And they rushed federal troops and aircraft into action, cutting the red tape that had grounded those resources a year ago as smoke clouds billowed over Colorado.

Within an hour, El Paso County had its emergency operations center up and running and summoned aircraft from nearby Peterson Air Force base. Rep. Doug Lamborn called the federal center in Idaho that coordinates western firefighting to speed up the process of clearing the planes. Gov. John Hickenlooper mobilized the Colorado National Guard, and troops began to help secure the rapidly growing evacuation zone.

White House officials said Saturday that President Barack Obama called Hickenlooper on Friday to get an update on conditions and reinforce his commitment to help.

The president also expressed his concern for the devastation and gave his condolences to families who have lost loved ones.

The cause of the blaze is under investigation, but Maketa said authorities believe it was caused by humans.

Before the fire got out of hand, authorities evacuated people miles away, sending deputies door-to-door to ensure everyone left.

They remembered the speed at which last year’s fire spread.

The latest blaze raced through the rural reaches of the metro area, doubling in size overnight. The bodies of two people were found inside their garage Thursday, their car doors open as though they had been about to flee.

Some Waldo Canyon evacuees endured days without knowing whether their houses survived. So Maketa sent deputies in at night to survey neighborhoods. It was a painstaking, risky process as ashes smoldered around them while they strained to determine the addresses of charred properties. About 24 hours later, the department began releasing the addresses of houses that were lost.

It might take two weeks to get a perfect count, however.

The rainfall in the burn area Friday made officials giddy. Hickenlooper toured the zone and said he was happily drenched.

“I’m soaking wet and I’m a little chilly, but I’ve never been so happy to say this,” he said.

The fire zone remained at 25 square miles, thanks to lighter winds and firefighters’ efforts to stamp out flare-ups. Sheriff’s deputies patrolling for looters directed crews to dozens of hot spots.

The fact that the state’s two most destructive wildfires have happened within a year — and in close proximity to each other — is a reminder of the challenges of tamping down wildfires across the West, especially with growing populations, rising temperatures and a historic drought.

Developers describe Black Forest as the largest contiguous stretch of ponderosa pine in the United States — a thick, wide carpet of vegetation rolling down from the Rampart Range that thins out to the high grasslands of Colorado’s eastern plains. Once home to rural towns and summer cabins, it is now dotted with million-dollar homes and gated communities as a result of the state’s population boom over the past two decades.

Waldo Canyon was one of the last subdivisions in Colorado Springs, bumping up directly against the pine-clad wilderness of the Rocky Mountains.

Other fires burned in Colorado, California and New Mexico. A southern New Mexico fire reached the historic mining town of Kingston, but an official said crews protected buildings there.

In Canon City, 50 miles southwest of Black Forest, the 5-square-mile Royal Gorge Fire was 40 percent contained and evacuation orders were lifted. A 350-acre fire sparked by lightning in Rocky Mountain National Park was 30 percent contained.

Meanwhile, crews were fighting a lightning-sparked fire near Rifle, on the state’s Western Slope. The fire was less than 1 square mile, and it was threatening structures, but it was unclear how many.