The US will reduce its troop presence in Iraq from 5,200 to 3,000 this month, a senior general said on Wednesday, affirming President Donald Trump's promise to withdrawal forces from the war-torn country. It comes as Mr Trump is attempting to secure a second term by fulfilling a pledge that he made four years ago when he came to power to get the US out of “endless wars." Marine General Frank McKenzie, the commander of US Central Command, said the reduction in Iraq reflects Washington's confidence in the ability of US-trained Iraqi security forces to handle the militant threat from ISIS, which captured large swathes of the country in 2014. "In consultation and coordination with the Government of Iraq and our coalition partners, the United States has decided to reduce our troop presence in Iraq from about 5,200 to 3,000 troops during the month of September," he said. Remaining US troops would continue advising and assisting Iraqi security forces as they attempt to root out remnants of the terror group It follows a meeting between Mr Trump and Iraqi Prime Minister Mustafa Al Kadhimi in August, in which the two sides discussed the status of the remaining forces in Iraq. A timeline was not issued for the actual pullout. American troops have come under several attacks in Iraq during the past year by suspected pro-Iranian militias. Tensions between Tehran and Washington heightened after a US strike that killed top Iranian general Qassem Suleimani and Iraqi militia leader Abu Mahdi Al Muhandis in early January. Since then, the Iraqi government has also faced pressure domestically to ask foreign troops to leave the country. Parliament voted in January for the departure of forces, it was followed by a slow withdrawal of US and other coalition troops. Washington has repeatedly said that it did not seek permanent bases or a permanent military presence in Iraq. US forces were deployed in 2014 to assist Iraqi forces in defeating ISIS, as part of a global coalition fighting the extremists. Officials in the coalition say Iraqi forces are now mostly able to handle the insurgents on their own. Germany announced on Wednesday the extension of its mandate to remain in Iraq on anti-ISIS operations until January 31, 2022 but will reduce troop numbers in country from 700 to 500. France has already withdrawn its troops and Britain has significantly downsized to just 100 personnel in recent months. British, French and US special forces are expected to remain deployed in undisclosed locations around the country. Still, attacks on US targets have continued. Late Tuesday, a bomb targeted a supply convoy heading to an Iraqi base where US troops are deployed, killing one member of the Iraqi security forces. The US's withdrawal from Iraq will be followed by another announcement that Washington will reduce the number of its forces in Afghanistan in the coming days. American forces are in Afghanistan to conduct counter-insurgency operations. The US currently has 8,600 soldiers stationed in Afghanistan, in accordance with a bilateral agreement signed in February between Washington and the Taliban. The decision to withdraw is seen as a step to promote inter-Afghan peace talks. Trump previously mentioned in an interview with Axios that the White House aimed to reach 4,000 to 5,000 troops in Afghanistan before the US presidential election on November 3. Under the US-Taliban deal, all foreign troops must leave the country by the spring of 2021, in exchange for security commitments from the militants. Mr Trump suggested that he planned to bring down the number of American troops to nearly 4,000 in Afghanistan. He promised that it would take place before the US presidential vote.