Updated

President Barack Obama absorbed the devastation of Colorado's wildfires Friday, visiting a neighborhood struck by the flames and taking in the acrid smells of charred homes while plumes of smoke rose from the surrounding mountains.

After declaring a "major disaster" in the state early Friday and promising federal aid, Obama got a firsthand view of the fires and their toll on residential communities. More than 30,000 people have been evacuated in what is now the most destructive wildfire in state history.

"Whether it's fires in Colorado or flooding in the northern parts of Florida, when natural disasters like this hit, America comes together," Obama said after touring a neighborhood where the fire left some homes standing but leveled surrounding properties. "We all recognize that there but for the grace of God go I. We've got to make sure that we have each others' backs."

Obama's appearance in Colorado took on added significance coming less than five months before the Nov. 6 presidential election. The state is a crucial bellwether in the contest between Obama and Republican challenger Mitt Romney, and the president's visit illustrated the enormous power of incumbency he enjoys to deliver not only assistance but to show compassion and command.

Stopping to greet firefighters and other first responders, Obama said: "The country is grateful for your work. The country's got your back." He later stopped at a YMCA shelter, where he was greeted with cheers and told volunteers "you guys are making us proud."

Obama spent a swift three hours in Colorado Springs, meeting only a handful of evacuees from fire-affected or threatened neighborhoods. The trip offered images of the president inspecting charred remains of a neighborhood but presented few opportunities for emotion-packed moments. Most of his time was spent with firefighters, or walking with state and local officials through evacuated neighborhoods.

The president first saw the fires and the smoky mountains as Air Force One approached Colorado Springs. His motorcade then weaved slowly through the neighborhood of Mountain Shadows, passing the wreckage of dozens of burned down homes and charred cars, including a melted Ford Taurus and a Toyota RAV-4.

He had special words for a group of firefighters who had just recently managed to save some houses in a subdivision attacked by the flames.

"They're genuine heroes," he said. He was accompanied by Colorado Springs Mayor Steve Bach, Colorado Gov. John Hickenlooper and members of the state's congressional delegation.

Obama also praised the cooperation between all levels of government.

A Wendy's restaurant across the street from a command post Obama visited had a sign that read: "We will get through this together."

Hundreds of homes have been destroyed by the blaze that has encroached on the state's second-largest city and threatened the U.S. Air Force Academy.

The White House said Obama made the trip to get a firsthand look at the wildfire damage and to assess whether additional federal resources are necessary.

But election-year political concerns also created an imperative for Obama to be on the ground. The presidential contest in Colorado is close, and Obama and Romney are looking to swing the state in their favor anyway they can.

About 46 percent of registered voters backed Obama, 42 percent backed Romney and 8 percent were undecided in an NBC News/Marist poll conducted in late May.

Colorado, with huge swaths of independent-minded voters, holds significant political weight in November. In a tight election, the state's nine electoral votes could make the difference between a win or a loss. Obama won Colorado in 2008.

Obama's campaign and a political action committee supporting him have spent more than $8 million on television advertisements in the state, according to Republican officials who track ad buys. Romney and outside groups backing his candidacy have spent more than $4 million.

Besides viewing the fire damage, Obama also has walked tornado-stricken streets in Missouri and Alabama, and met with flood victims in Tennessee — all states that voted against him in the 2008 presidential election.

Every decision the Obama White House makes to send him to a disaster zone is done under the shadow of Bush's botched response to Hurricane Katrina, which irrevocably damaged his presidency.

Bush was widely criticized as detached and uncaring when he viewed the flooding of New Orleans from the air rather than meeting with people on the ground. White House officials said at the time that they didn't want Bush's presence to distract from the recovery efforts.

Obama faced criticism that Friday's trip could divert time and resources away from the firefighting effort, assertions that were rejected by White House press secretary Jay Carney.

"We are not in any way pulling resources away," he told reporters traveling with the president. "We make sure that we don't."

___

Associated Press writer Thomas Beaumont and AP Deputy Director of Polling Jennifer Agiesta contributed to this report.

___

Follow Julie Pace at http://twitter.com/jpaceDC