The task now is to speed the pullout of the remaining U.S. forces, nearly 40,000 in number.
Staying behind in Iraq, where bombings and other violence still occur, will be 150 to 200 U.S. military troops as part of embassy security, the defense attache's office, and the office of security cooperation. That's common practice, but still a danger to American forces.
Obama, an opponent of the war since before he took office, nevertheless praised the efforts of U.S. troops in Iraq. He said American soldiers would leave "with their heads held high, proud of their success."
For Obama, Friday's announcement capped a remarkable two days of national security successes, though there's no indication how much they will matter to re-election voters more concerned with economic woes at home.
On Thursday, the president heralded the death of Libyan dictator Moammar Gadhafi and a day later the end to one of the most divisive conflicts in U.S. history.
The wars in Iraq and Afghanistan have cost the United States more than $1.3 trillion. Obama did not declare victory. He did speak, though, about the string of wins on his watch - none bigger than the killing of Osama bin Laden, the al-Qaeda leader behind the Sept. 11, 2001, terrorist attacks. The Afghanistan war still rages, but there, too, Obama has moved to end the combat mission by the end of 2014.
Shortly after taking office, Obama declared in February 2009 that the combat mission in Iraq would end by Aug. 31, 2010. And when that milestone arrived, he said it was "time to turn the page" on Iraq and put the focus back on building up the United States. On Friday, he said: "After nearly nine years, America's war in Iraq will be over."