President Joe Biden says US forces will end their combat mission in Iraq by the end of this year, but will continue to train and advise the Iraqi military.
The announcement came after Mr Biden held talks with Iraqi Prime Minister Mustafa al-Kadhimi at the White House.
There are currently 2,500 US troops in Iraq helping local forces counter what remains of the Islamic State group.
Numbers of US troops are likely to stay the same but the move is being seen as an attempt to help the Iraqi PM.
The US presence in Iraq has become a major issue since top Iranian general Qasem Soleimani and the leader of an Iran-backed Shia Muslim militia were killed in a US drone strike in the capital Baghdad last year.
Political parties aligned to Iran have demanded the withdrawal of all forces from the US-led global coalition against IS, despite the continuing threat posed by the Sunni jihadist group.
Shia militias have meanwhile been accused by the US of carrying out hundreds of rocket, mortar and drone attacks on Iraqi military bases that host coalition forces in an apparent attempt to pressure them to leave.
For the US president, the announcement marks the end of another war that began under former President George W Bush. This year he said US troops would leave Afghanistan.
Speaking at the White House, Mr Biden told his Iraqi counterpart “our counter-terrorism co-operation will continue even as we shift to this new phase.”
Mr Kadhimi responded: “Today our relationship is stronger than ever. Our co-operation is for the economy, the environment, health, education, culture and more.” He has insisted no foreign combat troops are needed in Iraq.
US-led forces invaded Iraq in 2003 to overthrow President Saddam Hussein and eliminate weapons of mass destruction that turned out not to exist.
Then President George W Bush promised a “free and peaceful Iraq”, but it was engulfed by a bloody sectarian insurgency.
Following the military defeat of IS in Iraq at the end of 2017, US forces remained to help prevent a resurgence of the group.
“Our role in Iraq will be dealing with being available to continue to train, to assist, to help and deal with ISIS as it arrives,” Mr Biden added at the meeting.
“But we’re not going to be, by the end of the year, in a combat mission.”