Patrick Shanahan (c) flew into Baghdad from Afghanistan, where he met US troops and Afghan leaders [Afghan GMIC via AFP]

Patrick Shanahan, the acting US defence secretary, has arrived in Baghdad on an unannounced visit for talks on the continued United States troops presence in Iraq

“We are in Iraq at the invitation of the government and our interests are to build Iraqi security capability,” Shanahan told reporters traveling with him on his first trip to Iraq on Tuesday.

“I want to hear first-hand from them about concerns, the political dynamics that they are facing and then based on that we will obviously factor that into our planning.”

The acting Pentagon chief is due to meet Prime Minister Adel Abdul Mahdi and will also discuss the withdrawal of US troops from Syria with US commanders.

US President Donald Trump caused angerin Baghdad this month when he said he wanted to keep troops at the Ayn al-Asad airbase, northwest of Baghdad, to keep an eye on Iran “because Iran is a real problem”.

That move would overstep the US-led coalition’s stated mission in Iraq and Syria of defeating the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group.

US mission in Iraq

Iraq is in a difficult position as tensions between its two biggest allies, the US and Iran, increase.

Trump’s comments prompted almost universal criticism from Iraq’s leaders, including Abdul Mahdi, and raised questions about the long-term presence of around 5,200 US troops in the country, 16 years after the US invasion to topple Saddam Hussein.

Iran-aligned politicians in Iraq’s parliament used the uproar to reiterate their demand that the US mission in Iraq be restricted and troop numbers reduced.

A draft law that would set a timetable for a US troop withdrawal is now before the Iraqi parliament.

It is backed by both of Iraq’s most powerful political groupings, the nationalist alliance led by Shia cleric Moqtada Sadr, and the pro-Iran movement of former anti-ISIL fighters.

At a rare joint news conference on Monday, the two groupings demand, at the very least, a “new agreement” setting tight conditions on any future foreign troop presence.

Those calls are likely to intensify as Washington carries out the full troop withdrawal from Syria unveiled in a shock announcement by Trump in December.

The plan prompted the resignation of Shanahan’s predecessor, Jim Mattis.

But with US-backed Kurdish-led fighters poised to overrun ISIL’s last enclave in eastern Syria, perhaps as early as this week, the withdrawal, which other administration figures had managed to slow, is now likely to gather pace.

Asked whether US troops in Syria could be moved to Iraq, Shanahan said on Tuesday that he would be having conversations on these topics during his visit.

He was in Afghanistan on Monday, where he met with US troops and President Ashraf Ghani amid a US push for peace talks with the Taliban.

Trump has indicated he would like to get US troops out of Afghanistan after 18 years of war, but Shanahan said he has no orders for a troop drawdown.

Get more stories like this on Twitter & Facebook

AD: To get thousands of free final year project topics and other project materials sorted by subject to help with your research [click here]