Syria's Kurds will be protected from Turkish military threats, US Secretary of State Mike Pompeo told Kurdish leaders in Iraq's semi-autonomous Kurdistan region on Wednesday during an unannounced trip to Erbil.

The top US diplomat earlier met Iraqi leaders in Baghdad as part of his Middle East trip to reassure allies about President Donald Trump's surprise plans to withdraw troops from Syria.

In Iraq, Pompeo also sought to smooth over relations after political leaders were angered when President Trump visited US troops on the day after Christmas at a remote desert air base without stopping in Baghdad or meeting any Iraqi officials.

Many politicians from the ruling coalition of mainly Shia parties called Trump's visit a violation of Iraqi sovereignty and demanded the US withdraw troops.

Pompeo met Prime Minister Adel Abdul Mahdi, President Barham Salih, Foreign Minister Mohamed Alhakim and Parliament Speaker Mohamed al-Halbousi, The Associated Press reported on Wednesday.

The US State Department did not immediately comment on reports of Pompeo's visit to Iraq.

"This is an opportunity to express our gratitude for the support we have received from the United States over the years. Certainly in the war against ISIS [also known as ISIL] this has been most crucial," Salih told reporters on Tuesday.

He added that although the Islamic State of Iraq and the Levant (ISIL) had been defeated militarily, "there is a lot more to be done, the mission is yet to be accomplished".

181231152428686

On Tuesday, Mahdi, the prime minister, had declined to confirm rumours of a possible visit by Pompeo, but said any meeting with the US secretary of state would involve a discussion of how to deepen Iraq's relationship wiht the US-led coalition fighting ISIL.

'A serious mistake'

For his part, Pompeo told a news conference in the Jordanian capital, Amman, on Tuesday that the fight to defeat ISIL and Iran remained the most pressing issues in the region.

The US forces have been working with a Kurdish militia, who control a swath of northeastern Syria, Washington's foothold in a conflict that has drawn in Russia, Iran, Turkey and other regional powers.

Washington has repeatedly said its Kurdish allies will remain safe despite the withdrawal. But Turkey, which considers the US-backed Syrian Kurdish YPG militia a "terrorist" organisation, has repeatedly vowed to crush the group.

Turkish President Tayyip Erdogan denounced visiting US National Security Adviser John Bolton on Tuesday for suggesting that protecting the Kurds would be a pre-condition of the US withdrawal, a suggestion Erdogan called "a serious mistake".

Asked in Erbil if Erdogan's pushback on the protection of the Kurds puts the withdrawal at risk, Pompeo told reporters: "No. We're having conversations with them even as we speak about how we will effectuate this in a way that protects our forces...

"It's important that we do everything we can to make sure that those folks that fought with us are protected and Erdogan has made commitments, he understands that," Pompeo added.

Countering Iranian influence

The meeting comes as Pompeo is taking part in an eight-country tour of the Middle East.

A major focus of the trip is sustaining a regional coalition to counter Iran, accused by Washington of sponsoring terrorism and the main enemy of US allies, Saudi Arabia and Israel.

Pompeo is also expected to visit Egypt, Bahrain, Qatar, Saudi Arabia, the United Arab Emirates, Oman and Kuwait.

Al Jazeera's Imran Khan, reporting from the Iraqi capital, Baghdad, said Iran was likely to have been a topic of discussion at Wednesday's meeting in Baghdad.

181227185231544

"Top of the agenda for both the Americans and the Iraqis are two very different things. The first thing for the Iraqis will be clarification of the US role in the country itself," he said.

"For the Americans, it's very much about the Iranian role within Iraqi society, both politically and militarily. They'll be seeking clarifications of what exactly Iran is up to here in Iraq.

"Iraq has a sanctions waiver to do business with Iran [and] the Americans have long criticised that. They're the ones that gave [Iraq] the waiver, but they've been very critical of it as well," Khan said.

The tour takes place amid confusion over conflicting statements by President Trump and senior US officials about the planned Syria troop withdrawal.

The US Secretary of State has the task of explaining US policy in the region after Trump's announcement of the withdrawal of all 2,000 US troops from Syria, which rattled allies and came as a shock to top US officials. Defence Secretary Jim Mattis quit over it.

Pompeo's comments come after US National Security Adviser left Turkey after he was snubbed by the Turkish president over his comments to protect Kurdish fighters in Syria.