As Iraqi flags were raised in what was once a giant U.S. military base, Joe Biden joined Iraqi officials in honoring forces who the vice president said made it possible to "end this war."
The American military's role here is nearing an end, but Iraqis still must contend with the violence that the nearly nine-year conflict unleashed: 20 people were killed in attacks around the country Thursday.
Biden's comments came during a ceremony at Camp Victory, one of the last American bases that will be handed over to the Iraqi government before U.S. troops leave Iraq this month.
The Iraqi government hosted the ceremony as a way to honor the sacrifices of Iraqi and U.S.-led coalition forces.
"Because of you and the work that those of you in uniform have done, we are now able to end this war," Biden told the hundreds of American and Iraqi service members.
Speaking under a massive chandelier in a Saddam-era palace that Biden referred to as a "grotesque monument to a dictator's greed," the vice president said the U.S. takes "immense pride" in what the American troops have been able to do in Iraq and that they are leaving with their heads held high.
"We owe you. We owe you," said Biden, whose son has served in Iraq.
He praised the Iraqis for the military they have been able to raise from the "ashes of so much turmoil."
Iraqi President Jalal Talabani, referring at times to "our friends, the Americans," praised the troops for their sacrifices and said that based on the "joint efforts" of the coalition and Iraqi forces, stability in the country has been restored.
Prime Minister Nouri al-Maliki, a Shiite who won re-election last year, was much more circumspect in his comments, focusing his thanks and praise for the U.S. military withdrawal as promised rather than on American sacrifices or achievements such as overthrowing Saddam Hussein.
"I extend my appreciation to Barack Obama's administration for carrying out the withdrawal from all Iraqi lands on time," he said.
Al-Maliki is in a tough position domestically. He owes his second term as prime minister to the support of Shiite cleric Muqtada al-Sadr, who is vehemently opposed to the American military's presence in Iraq. But he has also forged a close relationship with the U.S., which can serve as a counterweight to neighboring Iran and sell billions of dollars in weapons to Iraq.
Biden's visit, which began Tuesday, was meant to chart a path for a new U.S. relationship with a country that is home to billions of barrels of oil reserves and more closely aligned with Iran than the U.S. would like.
The vice president alluded to the threat of Iran, which U.S. officials have repeatedly accused of financing Shiite militias who then attack American troops and diplomats.
"The Iraqi people will not, have not, and will not again yield to any external domination, and they would never abide another nation violating their sovereignty by funding and directing militias that use Iraqi terrain for proxy battles that kill innocent Iraqi civilians," he said.
Even as the remaining American troops prepare to leave, violence and instability remain a constant in Iraq, albeit dramatically less so than at the height of the conflict.
Two separate attacks on Thursday in Iraq's northeast killed 20 people and wounded 32.
A parked car bomb exploded at an open marketplace in the town of Khalis as morning shoppers were starting to arrive, killing 13 and wounding 28 people, according to officials.
Earlier at dawn _ in the town of Buhris, also in Diyala province _ gunmen stormed the home of a Sunni fighter who opposed al-Qaida, killing him and six of his family members.
Iraqi security officials maintain they are fully prepared for the American withdrawal, which is required under a 2008 security pact between the U.S. and Iraq. About 13,000 U.S. troops are still in the country, down from a one-time high of about 170,000.
But many Iraqis are concerned that insurgents may use the transition period to launch more attacks in a bid to regain their former prominence and destabilize the country.
Biden did not address the day's violence directly, but emphasized that Iraqi security forces would be able to protect the country without their one-time American military backers.
"It doesn't mean that the threats are over. Far from it," Biden said. "But Iraqi security forces have been well-trained, prepared, and you are fully capable of meeting the challenges."
On Thursday, Iraqi flags and tinsel had replaced the American flags that used to line the driveway at Al Faw palace, which served as the U.S. military's headquarters almost since the first U.S. troops battled their way through here in 2003.
Iraqi flags hung from the palace walls. In a practice almost unheard of inside buildings run by the U.S. military, Iraqi band members whipped out their packs of cigarettes immediately after the ceremony and lit up.
Associated Press Writer Sameer N. Yacoub contributed to this report from Baghdad.