President Barack Obama welcomed home some of the last U.S. troops from Iraq on Wednesday, marking a symbolic end to the nearly nine-year war that strained America's armed forces and inflicted lasting damage to its standing worldwide.

Addressing soldiers at Fort Bragg, North Carolina, home of the 82nd Airborne Division, Obama stopped short of declaring victory in Iraq but called the winding down of the conflict an extraordinary achievement.

It is harder to end a war than to begin one, he told about 3,000 soldiers gathered in an airplane hangar. Despite lingering questions about whether the United States should have invaded the country, the last American troops will cross the border out of Iraq with their heads held high, he said.

Of course, Iraq is not a perfect place. But we are leaving behind a sovereign, stable, and self-reliant Iraq, with a representative government that was elected by its people, he said. We are ending a war not with a final battle, but with a final march toward home.

As of this week, there were about 5,500 U.S. troops left in Iraq, down from more than 170,000 at the height of the war that Obama's predecessor George W. Bush started in the wake of the September 11, 2001 attacks.

Leaving Iraq fulfills a promise that helped Obama win the presidency in 2008 and allows the White House to focus more on Afghanistan as well as economic worries at home, where the high jobless rate will be a major concern for voters next year.

But critics have accused Obama of ending the war hastily to suit his re-election campaign, warning the U.S. departure could embolden insurgent fighters as well as Iraq's neighbour Iran.

UNPOPULAR WAR

Mitt Romney, a leading Republican contender for the 2012 presidential race, said in an open letter to Obama on Wednesday that words of welcome to our returning soldiers is not enough and called it a disgrace that veterans of the Iraq war face unemployment several points higher than the national rate.

And John McCain, who ran against Obama for the presidency in 2008, said this week he found it a bit presumptuous for Obama to take credit for a war he opposed to and was set to respond later on Wednesday to what he called the president's victory lap in Fort Bragg.

Obama owes his presidency in part to his opposition to the Iraq war, which grew hugely unpopular as the Bush administration progressed and claims that Iraqi leader Saddam Hussein was hiding weapons of mass destruction and supporting al Qaeda militants turned out to be false.

As an Illinois state legislator, Obama gave a stirring speech in 2002 warning that invading Iraq would plunge the United States into a dumb war and he used his anti-war stance to distinguish himself in the Democratic presidential run-off from Hillary Clinton who voted in Congress to go to war in Iraq.

In office, Obama moved quickly to scale back what his aides had dubbed Bush's war and to shift the Pentagon's focus to Afghanistan and its border with Pakistan, which he called the neglected battleground in the fight against al Qaeda.

Commentators now see that conflict as Obama's war and believe his presidency will be judged more on the outcomes of the Afghan campaign than on developments in Iraq, especially in the wake of the U.S. killing of al Qaeda leader Osama bin Laden.

In Fort Bragg, Obama thanked soldiers and their families and said he was confident the U.S. departure from Iraq as well as the eventual transition from Afghanistan would leave the United States in a more robust position.

Because of you, we are ending these wars in a way that will make America stronger and the world more secure, he told the troops, who punctuated his speech with cheers and hollers.

(Writing by Laura MacInnis; Additional reporting by Matt Spetalnick; Editing by John O'Callaghan and Cynthia Osterman)