Mr. Obama made his announcement to wind down the unpopular six-year war in front of hundreds of Marines and officers at Camp Lejeune, N.C., which is deploying thousands of troops to the war in Afghanistan.
"I have chosen a timeline that will remove our combat brigades over the next 18 months. Let me say this as plainly as I can: by Aug. 31, 2010, our combat mission in Iraq will end," he said.
Listen to the full speech
Mr. Obama said 35,000 to 50,000 troops would remain to train and equip Iraqi forces, protect civilian reconstruction projects and conduct limited counterterrorism operations. Those troops would likely be in place through 2011.
The Iraq timetable marks a historic juncture in a war that cost the lives of some 4,250 U.S. soldiers and helped define the presidency of George W. Bush.
"The most important decisions that have to be made about Iraq's future must now be made by Iraqis," Mr. Obama said.
Senior Obama administration officials told the Associated Press earlier that of the roughly 100,000 U.S. combat troops to be pulled out of Iraq over the next 18 months, most will remain in the war zone through at least the end of this year to ensure national elections there go smoothly. The pace of withdrawal suggests that although Obama's promised pullout will start soon, it will be backloaded, with most troops returning in the last few months of the timeframe.
With most Americans telling pollsters they believe the war was a mistake, the end date for Iraq combat operations is slower than the new president had promised voters as a candidate, according to the AP. The timetable he pledged then would have seen combat end in May 2010.
"America can no longer afford to see Iraq in isolation from other priorities: we face the challenge of refocusing on Afghanistan and Pakistan; of relieving the burden on our military; and of rebuilding our struggling economy and these are challenges that we will meet," he said.
"Every nation and every group must know, whether you wish America good or ill, that the end of the war in Iraq will enable a new era of American leadership and engagement in the Middle East," he said. "This does not lessen our commitment. We are going to be enhancing that commitment to bring about a better day in that region, and that era has just begun."
The president applauded the military for its role in an improved situation in Iraq, where violence is down significantly in Baghdad and most of Iraq and U.S. military deaths plunged.
He also acknowledged that many problems remain in the country and said "there will be difficult days ahead." Those include violence that will remain "a part of life."
But, the president said the United States cannot continue to try to solve all Iraq's problems.
"We cannot rid Iraq of all who oppose America or sympathize with our adversaries," he said. "We cannot police Iraq's streets until they are completely safe, nor stay until Iraq's union is perfected. We cannot sustain indefinitely a commitment that has put a strain on our military, and will cost the American people nearly a trillion dollars."
President Obama said Iraq had weathered "horrific" sectarian killings in 2006 and 2007 but that violence had now been substantially reduced, while the capabilities of Iraq's security forces, rebuilt after the U.S.-led invasion in 2003, had improved.
The president phoned Iraqi Prime Minister Nouri al-Maliki and former President Bush to brief them on his announcement, the White House said, according to Reuters.
Mr. Obama's visit to Camp Lejeune comes at the end of a week in which he focused on rebuilding the U.S. economy and unveiled a $3.55 trillion budget blueprint for fiscal 2010.
Tonight on the NewsHour: Jim Lehrer speaks with President Obama about his plans for the country's two wars.