During a meeting with Iraqi Prime Minister Mustafa al-Kadhemi in August, Trump said American troops would leave Iraq but gave no timetable.
The talks between the pair came with attacks on American targets by pro-Iranian fighters on the rise and the Iraqi government facing calls to expel the roughly 5,000 US troops deployed in the country as part of anti-jihadist efforts.
The US military withdrew from Iraq in late 2011, leaving a small mission attached to the US embassy.
But additional American forces were deployed a few years later to support Iraqi forces in their war against Islamic State, which carried out a devastating offensive in the summer of 2014.
In Afghanistan the US currently has 8,600 soldiers in accordance with a bilateral agreement signed in February between Washington and the Taliban. The Pentagon said in August that its goal was to get down to fewer than 5,000 troops as inter-Afghan peace talks progress.