Iraqi policemen search a truck at a checkpoint in central Baghdad on Sunday, Aug. 1, 2010. July was the deadliest month for Iraqis in more than two years, according to newly released figures that show 535 Iraqis were killed in various attacks across the country. (AP Photo/Karim Kadim)

Washington (AP) - President Barack Obama hailed the coming end of the U.S. combat mission in Iraq, but the gamble is huge -- a wager that the country won't fall back into murderous anarchy.

And as he spoke of the need to be "humbled by the profound sacrifice" of American men and women who fought the war, Obama left out or glossed over some politically uncomfortable key facts.

That may reflect Obama's sinking poll numbers -- driven by a stubborn 9.5 percent unemployment rate, an anemic economic recovery and broad anti-incumbent sentiment -- with just three months remaining to congressional elections.

There is a good chance Obama's Democrats could surrender their big majority in the House and several seats in the Senate. They could even lose control of both chambers.

The president was walking a difficult line in his speech Monday to the Disabled American Veterans. His ambiguous record on the war before taking office and the fact that an end-of-2011 total withdrawal deadline was already in place were sure to have diluted his message.

As an opponent to what he, in 2002, called "a dumb war, a rash war," Obama also strenuously challenged the Bush administration's so-called troop surge in 2007, which is broadly credited with pulling Iraq back from the brink of civil war.

Obama said the combat mission will end by Aug. 31 "as promised and on schedule," but the pullout was, in fact, preordained by the U.S.-Iraqi "Status of Forces Agreement" that took effect before his inauguration in January 2009.

And as Obama spoke glowingly of the end of combat, the president wisely issued a caveat -- Iraqi reality.

The 50,000 U.S. troops who remain 16 more months as trainers, security forces and counterterrorism squads still face a grave mission.

"These are dangerous tasks," Obama said. "And there are still those with bombs and bullets who will try to stop Iraq's progress. The hard truth is we have not seen the end of American sacrifice in Iraq."

Nor is there an end to tragedy for Iraqi citizens, who still are dying in terrorist shootings and bombings at a rate that belies any claim to even near normalcy seven years after former President George W. Bush ordered the invasion.

Iraq's political system remains wobbly. Nearly five months after inconclusive March 7 elections, politicians still are struggling to form a new government. The bitter political tug-of-war and ensuing power struggle have heightened worries about concerted insurgent attacks.

Al-Qaida in Iraq shows signs of returning to a strength that threatens the advances made during the American troop buildup in 2007.

Oil production -- the basis of the Iraqi economy -- still has not returned to prewar levels, and those were down significantly as a result of U.N. sanctions imposed after the first Gulf War.

About 1.8 million Iraqis remain abroad, a majority having fled to Syria and Jordan to avoid the ravages of war. Before the U.S. invasion, only an estimated half-million Iraqis lived abroad.

Billions of dollars have been spent to fix Iraq's antiquated electricity grid since the 2003 invasion, but many Iraqis still get power less than six hours a day -- about the same or sometimes even less than they received under Saddam Hussein.

At least 4,413 members of the U.S. military have died since the invasion and nearly 32,000 have been wounded.

Given those difficult numbers, Obama sought a patriotic space for his opposition to the war, fully aware of the heavy price paid by the veterans in his audience.

"There are patriots who supported going to war, and patriots who opposed it," the president said. "But there has never been any daylight between us when it comes to supporting the more than 1 million Americans in uniform who have served in Iraq -- far more than any conflict since Vietnam."

Hanging over the Aug. 31 milestone in Iraq, of course, remains the difficult -- some say losing -- war in Afghanistan, where, Obama reminded his listeners, "al-Qaida plotted and trained to murder 3,000 innocent people on 9/11."

Glad to be rid, or nearly so, of the resource- and life-draining fight in Iraq, the president sought plenty of attention for what he hopes will mark the real beginning of the end of a fight he believes should never have been fought -- a war that produced searing divisions among Americans.

His job now, if Iraq doesn't fall apart again, will be to hold together faltering Democratic support for the increasingly bloody Afghanistan conflict.

In one of the more partisan periods in recent U.S. political history, Democrat Obama finds himself relying overwhelmingly on Republicans for support in Afghanistan.

------

EDITOR'S NOTE -- Steven R. Hurst, an international political writer for The Associated Press, was Baghdad bureau chief from 2005-08.

(Copyright 2010 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)