President Barack Obama says the United States will withdraw most of its combat troops from Iraq in the next 18 months. Roughly one-third of the troops would stay through 2011 to provide security and training.

Almost six years after the war in Iraq began, President Obama has assigned a date to the end of the war. "Let me say this as plainly as I can: By August 31, 2010, our combat mission in Iraq will end," he said.

The president made his announcement Friday at Camp Lejeune, a military base in North Carolina. Thousands of Marines there have been sent to Iraq, and thousands more are getting ready to be deployed to Afghanistan.

The 18-month timetable is slower than the 16-month withdrawal Mr. Obama had promised voters last year, but still accelerates the U.S. exit.

The president's schedule for leaving Iraq was the one recommended by Defense Secretary Robert Gates and other top military advisers.

Mr. Obama plans to pull out roughly two-thirds of the 142,000 U.S. troops in Iraq. He says those who remain will train Iraqi security forces, protect civilians and fight terrorism. "After we remove our combat brigades, our mission will change from combat to supporting the Iraqi government and its security forces as they take the absolute lead in securing their country," he said.

The last U.S. troops are to leave Iraq by the end of 2011, under an agreement between the two countries.

Mr. Obama said another part of his strategy is for the U.S. to work with all the nations of the Middle East, including Iran and Syria. "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.

Republican Senator John McCain, who sharply criticized Mr. Obama's Iraq withdrawal plan during last year's campaign, now says he is cautiously optimistic that the plan will work. "The greatest risk will be present ahead of the December elections, and conditions could worsen before or even after they take place. With these factors in mind, I believe the president's withdrawal is a reasonable one," he said.

In his speech at Camp Lejeune, President Obama also confirmed that Christopher Hill will be the new U.S. ambassador to Iraq. Hill was the Bush administration's lead negotiator with North Korea.