Joe Biden and the Iraqi prime minister, Mustafa al-Kadhimi, have sealed an agreement formally ending the US combat mission in Iraq by the end of 2021, more than 18 years after troops were sent to the country. The US 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.