U.S. President Joe Biden and Iraqi Prime Minister Mustafa al-Kadhimi on Monday sealed an agreement formally ending the U.S. combat mission in Iraq by the end of 2021, more than 18 years after U.S. troops were sent to the country, Reuters reported.

"Our role in Iraq will be ... to be available, to continue to train, to assist, to help and to deal with ISIS as it arises, but we’re not going to be, by the end of the year, in a combat mission," Biden told reporters as he and Kadhimi met.

There are currently 2,500 U.S. troops in Iraq focusing on countering the remnants of Islamic State. The U.S. role in Iraq will shift entirely to training and advising the Iraqi military to defend itself.

The shift is not expected to have a major impact since the United States has already moved toward focusing on training Iraqi forces.

"Nobody is going to declare mission accomplished. The goal is the enduring defeat of ISIS," a senior administration official told reporters ahead of Kadhimi's visit.

The senior administration official would not say how many U.S. troops would remain on the ground in Iraq for advising and training.