* More favorable weather allows fire crews to gain ground
* Some 20,000 homes are still threatened by the flames
* 347 homes already destroyed, a record for Colorado
* Some 50 large uncontained wildfires burning across U.S. (Recasting; updates containment figure; new quotes, details)
By Keith Coffman and Jeff Mason
COLORADO SPRINGS, Colo., June 29 (Reuters) - President Barack Obama on Friday promised federal assistance for Colorado's worst-ever wildfire as he toured damage caused by the blaze, which has killed two people, destroyed hundreds of homes and forced the evacuation of 35,000 residents in and around the state's second-largest city.
Obama began his three-hour visit with an Air Force One fly-over of the area left devastated by a blaze that has raged for a week near the base of the famed Pikes Peak mountaintop, while fire crews, taking advantage of more favorable weather, gained additional ground against the flames.
The so-called Waldo Canyon Fire unleashed its greatest fury on Tuesday night when, stoked by strong, erratic winds, it roared into foothill communities in the northwestern corner of Colorado Springs and threatened the U.S. Air Force Academy campus in town.
Lighter winds since then have helped firefighters, numbering over 1,000 by week's end, make greater headway in corralling the flames. By Friday afternoon, they had managed to carve containment lines around 25 percent of the fire's perimeter, up from 15 percent on Thursday.
As of Friday, the fire had scorched nearly 17,000 acres (6,880 hectares) of timber and brush, much of it in the Pike National Forest west of Colorado Springs, a city of more than 400,000 inhabitants about 50 miles south of Denver.
While fire officials said 20,000 homes remained threatened by the blaze, evacuation orders were lifted for some of the estimated 35,000 residents chased from their dwellings earlier this week.
But progress against the blaze was accompanied by grim news as authorities confirmed the full extent of destruction from Tuesday's firestorm - 347 homes destroyed, most of them in the upscale subdivision known as Mountain Shadows.
The tally of homes consumed by the Waldo Canyon blaze ranks as the most on record for Colorado, surpassing the 257 homes destroyed recently by a much larger blaze north of Denver.
Aerial photos of devastation unleashed by the fire showed large swaths of neighborhoods reduced to gray ash - one house after another obliterated while adjacent dwellings survived mostly unscathed.
Also on Friday, Colorado Springs Police Chief Peter Carey said a second body was found in the debris of a burned-out home. The discovery of the first was announced late on Thursday.
Their deaths bring to six the number of people who have perished so far this year in a Colorado wildfire season described by the governor as the worst ever in the state.
FIRE ACROSS THE WEST
"This has been a devastating early fire season for Colorado. This community, obviously, is heartbroken by the loss of homes," Obama said to reporters as he walked along a street of burned-out houses. "We're lucky, because of the quick action that's been taken, that we haven't seen a lot of loss of life."
Obama's motorcade drove through a neighborhood dotted with houses that remained intact next to others that had burned to the ground, rolling past the melted remains of a children's play area and shells of cars destroyed in the inferno.
The president capped his trip by visiting with evacuees at an emergency shelter operated by the American Red Cross.
One of them, Angi Stoffel, 39, recalled the terrifying moments before she and her family were forced to flee.
"The grass back behind our house has been burned, so I guess we're kind of close," she said. "That first night was horrible. It was very scary, so we went all the way to Pueblo just to get away and try to get our thoughts together and get a game plan."
Waldo Canyon was among nearly 50 large, uncontained wildfires being fought across the United States, the bulk of them in 10 western states - Colorado, Montana, Wyoming, Utah, Idaho, South Dakota, Arizona, New Mexico, Nevada and even Hawaii, according to the National Interagency Fire Center.
As of Thursday, 21 heavy airplane tankers continued to fly in and out of firefighting action across the Western states, joining 170 helicopters, 550 fire engines and more than 8,800 personnel on wildfire lines around the country, said White House spokesman Jay Carney. He said about half of all active federal wildfire-fighting resources were currently staged in Colorado.
Obama announced that federal money would be made available to local agencies and individuals affected by the fire.
"We have been putting everything we have into trying to deal with what is one of the worst fires we've seen here in Colorado," Obama said, speaking at a fire station where he shook hands with firefighters and praised them for their courage. But he added: "We've still got a lot more work to do."
While authorities began allowing some evacuees to return Thursday night, hundreds of residents from neighborhoods caught in the heart of a major firestorm on Tuesday remained displaced.
The FBI is investigating whether any of the wildfires were started by criminal activity, but the cause remains unknown.
The fire menacing Colorado Springs follows a recent string of suspected arson fires in a neighboring county, but officials said they had no indication the blaze was deliberately set.
Although federal authorities say the fire season got off to an early start in parts of the Northern Rockies, the number of fires and acreage burned nationwide is still below the 10-year average for this time of year, according to fire agency records. (Additional reporting by Joseph O'Leary and Ellen Miller; Writing by Mary Slosson; Editing by Paul Simao and Todd Eastham)