Barack Obama, the President of the United States, has welcomed home some of the last US troops from Iraq in a ceremony to mark the coming end of his country's near-nine-year military campaign since a 2003 US-led invasion.
The US president paid tribute to about 3,000 soldiers gathered at the Fort Bragg military station in North Carolina on Wednesday, saying he was proud to welcome them home after what he called an "extraordinary achievement".
"I want to speak to you about the end of the war in Iraq," he said, as hundreds of soldiers cheered in appreciation.
"Over the last few months, the final work of leaving Iraq has been done. Dozens of bases ... that house American troops have been closed down or turned over to the Iraqis.
Obama said those US troops still stationed in the country would soon "move south on desert sands, and then they will cross the border out of Iraq with their heads held high".
|Follow in-depth coverage of the nation in flux
"One of the most extraordinary chapters in the history of the American military will come to an end. Iraq’s future will be in the hands of its people. America’s war in Iraq will be over."
As of this week, there were 5,500 US troops left in Iraq, down from more than 170,000 at the height of the war.
Leon Panetta, the US defence secretary, will attend a formal flag-lowering ceremony to mark the closure of the US military headquarters in Iraq on Thursday.
The US-led invasion in 2003 toppled Saddam Hussein, the former leader who was executed after a controversial trial in Baghdad. Saddam's sons Uday and Qusay also died in the fighting months after it began.
"We knew this day would come. We’ve known it for some time. But still, there is something profound about the end of a war that has lasted so long," Obama said.
Jubilation in Fallujah
Iraqis have received news of US troops pullout with jubilation - and thousands in the city of Fallujah took to the streets to celebrate on Wednesday in an event dubbed as the first annual "festival to celebrate the role of the resistance".
Demonstrators rallied across the city, shouting slogans in support of the "resistance", a reference to the campaign by Iraqi fighters in Fallujah that was a bastion of opposition against the invasion.
Some burned US and Israeli flags while others held up banners and placards inscribed with phrases such as "Now we are free" and "Fallujah is the flame of the resistance".
Others carried posters bearing photos of apparent fighters, faces covered and carrying weapons. They also held up pictures of US soldiers killed and military vehicles destroyed
Widespread fighting in Fallujah against the occupation begun in 2003, after a controversial event known as the "pupil's uprising".
US forces had turned a school into their city headquarters in April 2003. When 200 demonstrators gathered outside asking for the school to be reopened, US forces opened fire, killing at least 13 civilians and injuring dozens.
The US military said they had shot at armed men after being fired upon from nearby rooftops, but marchers insisted their demonstration had been unarmed and peaceful.
The city was also the focus of two major US offensives in 2004 after four US employees of US private security firm Blackwater, since renamed Xe and later Academi, were killed in the city.
Al Jazeera's Jane Arraf reports on Iraq's security forces' preparedness to maintain security
Signs of the attacks are still visible today in collapsed buildings and bullet holes in walls.
Around 2,000 civilians and 140 US troops died in the second offensive in November 2004 which is considered to have been one of the fiercest battles involving US forces since the Vietnam war.
Al-Maliki in Washington
Obama's comments on Wednesday came as Nouri al-Maliki, the Iraqi prime minister, continued his visit to the US to finalise arrangements for the troops' withdrawal.
As well as meeting Obama and senior US officials, al-Maliki joined Obama to lay wreaths at a military cemetery in Arlington, Virginia, where many of the almost 4,500 US troops killed in Iraq are buried.
Obama was a vocal critic of the war in Iraq, launched by his predecessor, George W. Bush, prior to his election to the White House in 2008.
In a speech in 2002, Obama called the looming conflict in Iraq a "dumb war", adding: "I know that even a successful war against Iraq will require a U.S. occupation of undetermined length, at undetermined cost, with undetermined consequences."
Reflecting on the origins of the conflict on Wednesday Obama told troops: "Many of you were in grade school; I was a state senator. Many of the leaders now governing Iraq were living in exile and since then our efforts in Iraq have taken many twists and turns," he said.
He said the war was a source of great controversy at home - with patriots on both sides of the debate. But he said there was one constant - "the patriotism of the troops and their commitment to fulfill the mission".