The United States will stick to its military role in Iraq, acting Defence Secretary Pat Shanahan insisted, delivering a direct message to Baghdad aimed at consoling politicians pushing for an American troop withdrawal. Mr Shanahan, who was making his first visit to Baghdad, told officials on Tuesday that the US will respect Iraq’s sovereignty. The future of American troops in Iraq has been called into question after a series of comments by US President Donald Trump that indicated a change to the country's military mission. “I wanted to make clear to him [Iraqi PM Adel Abdul Mahdi] that we recognise our role,” Mr Shanahan told reporters later after he flew to Brussels. “We understand that we’re there by invitation, and that we jointly share the resources and that we clearly recognise their sovereignty.” The US has about 5,200 troops who act as trainers and advisers to Iraq's security forces in their battle against ISIS. Mr Shanahan, who is on the second leg of his first international trip as acting defence secretary, said he discussed with Mr Abdul Mahdi ways to "generate more capacity and capability in the Iraqi security forces”. He said that Washington is aware of Iraq's parliamentary proposals to limit the number of US troops in the country. Tensions between Washington and Baghdad rose as Mr Shanahan took over as acting Pentagon chief following the resignation of Jim Mattis as defence secretary in December. It remains unclear whether the US president will nominate Mr Shanahan for Senate confirmation. Mr Trump upset Iraqi officials earlier this month by saying American troops in Al Asad Airbase north-west of Baghdad would monitor Iran after their withdrawal from neighbouring Syria and also strike at ISIS from Iraq. The US leader also visited the airbase in December but failed to meet Iraqi officials, something which raised tensions. Iraqi politicians say that Mr Trump's remarks on Iran and Syria are not part of the US mission in Iraq, which has been to defeat ISIS. Baghdad declared victory over the extremists in December 2017, but the American presence remains unpopular. Some Iraqi MPs are working on a draft bill calling for the withdrawal of the more than 5,000 US soldiers. Iraq's constitution prohibits the use of Iraqi territory as a base to threaten a neighbouring state. Mr Trump’s comments are neither US policy nor a new strategy, Sarkawt Shamsadin, an Iraqi MP said. “What is needed is a series of meetings and hearings on this matter with Iraqi military commanders, the Iraqi foreign minister, experts in Washington and Baghdad to help us (MPs) to make a rational decision,” Mr Shamsadin said. “The US and Iraq are partners and we should not be shy to directly talk to the administration and tell them about the impact of Mr Trump’s comments on our bilateral relations,” Mr Shamsadin said. The shift in US policy lead to a major debate in Iraq, especially after Shiite politicians backed by Iran made significant gains in parliamentary elections last year. But some officials speculate that Mr Trump’s statement is unlikely to affect US-Iraqi relations. “Over time his statements will be forgotten,” Jaber Al Jaberi, an MP in Anbar province said.