Obama marks end of Iraq war at Fort Bragg
In a speech at Fort Bragg in North Carolina, he paid tribute to the soldiers who served and died in the war, and their families.
The last US soldiers are expected to withdraw from Iraq within days.
Republicans have criticised the pullout citing concerns over Iraq's stability, but most Americans support the move.
In Wednesday's speech, President Obama - who owes his presidency in part to his opposition to the Iraq war - hailed the bravery of US troops during the nearly nine-year conflict.
"Tomorrow the colours of the United States Forces Iraq, the colours you fought under, will be formally cased in a ceremony in Baghdad," said Mr Obama, who was on his first visit to Fort Bragg. "Then they'll begin their journey across an ocean back home.
"As your commander in chief and on behalf of a grateful nation, I'm proud to finally say these two words - welcome home, welcome home, welcome home," he told thousands of cheering troops in an airplane hangar.
Mr Obama announced in October that all US troops would leave Iraq by the end of 2011, a date previously agreed by former President George W Bush in 2008.
'Heads held high'
The last combat troops departed in August last year.
Mr Obama - who was joined by his wife Michelle, an active veterans' advocate - told the troops the US was leaving Iraq with "heads held high".
Some 1.5 million Americans had served in Iraq, nearly 4,500 had died and 30,000 had been wounded, Mr Obama said, adding that "those numbers don't tell the whole story of Iraq".
Recalling the roadside bombs and sniper attacks of the insurgency, he said: "Everything that American troops have done in Iraq, all the fighting and dying, bleeding and building, training and partnering, has led us to this moment of success."
"The war in Iraq will soon belong to history, and your service belongs to the ages," he added.
US troop numbers in Iraq peaked at around 170,000 during the height of the so-called surge strategy in 2007, but as of this week only about 5,500 remain; Kazinform cites BBC.
To learn more go to www.bbc.co.uk