US President Barack Obama has confirmed the end of all combat operations in Iraq by 31 August.
Some 50,000 of 65,000 US troops currently in Iraq are set to remain until the end of 2011 to advise Iraqi forces and protect US interests.
Mr Obama proclaimed that the end of operations would arrive "as promised and on schedule".
It comes amid a dispute between the US and Baghdad over the latest casualty numbers in Iraq.
The thrust of Mr Obama's speech was the fulfilment of his campaign promise to end the Iraq war, which was a defining characteristic of his 2008 candidacy.
Mr Obama made his announcement in a speech to the national convention of the Disabled American Veterans in Atlanta, Georgia.
The remaining 50,000 troops will stay in the country in order to train Iraqi security forces, conduct counterterrorism operations and provide civilians with ongoing security, said Mr Obama.
An agreement negotiated with the Iraqis in 2008 states that these troops must be gone from the country by the end of next year.
But the president warned the US had "not seen the end of American sacrifice in Iraq".
He added: "But make no mistake, our commitment in Iraq is changing - from a military effort led by our troops to a civilian effort led by our diplomats."
Meanwhile, according to the US military, 222 people died in attacks last month. Baghdad says 535 lost their lives - which would make July the deadliest month in the country for more than two years.
The US released its own figure after Baghdad's estimate prompted concern that insurgents were exploiting a post-election power vacuum - and would wreak more havoc as the US withdrew more troops.
"The claim that July 2010 was the deadliest month in Iraq since May 2008 is incorrect," a US military statement said.
The US offered no full explanation as to why its figures differed so markedly from those issued by the Iraqi authorities.
As the November congressional elections loom, Mr Obama wants to continue to hail the progress his administration has made in Iraq as a success, analysts say.
The BBC's Hugh Sykes reports from Baghdad that some Iraqis worry that attacks by al-Qaeda in Iraq are increasing again as the Americans leave.
Two bombings and a shooting killed eight people in Iraq on Monday.
Many Iraqis are also concerned about the failure to form a government, our correspondent says.
Since an inconclusive legislative election in March, Sunni, Shia and Kurdish factions that won most seats have disagreed about who should be the next Iraqi prime minister.
Fears have been rising that the ongoing political uncertainty could hinder the plans for a full US military departure by the end of 2011.
While the US has been scaling down its troop presence in Iraq, it has been stepping up its military commitment to Afghanistan, with the president ordering a surge of 30,000 additional soldiers there.
"We face huge challenges in Afghanistan," said Mr Obama. "But it's important that the American people know that we are making progress and we're focused on goals that are clear and achievable."
But some are saying Obama's plan to begin withdrawing troops in Afghanistan as early as next July could encourage the Taliban and other extremist groups.
Although there has been an increase in US troops in Afghanistan, there are fewer troops in Iraq and Afghanistan today than when Mr Obama first entered the White House.
The Obama administration says once the Iraq withdrawal is finished, there will be a total of 146,000 troops on the ground in Iraq and Afghanistan - which is a drop from 177,000 in January of 2009.