BAGHDAD -- Secretary of State Mike Pompeo sought Wednesday to reassure U.S.-backed Kurdish forces in Syria that they will be safe after American troops withdraw from the country.

Amid confusion over plans to implement President Donald Trump's pullout order and threats from Turkey to attack the Kurds, Pompeo made an unannounced stop in Iraq while on a weeklong trip to the Middle East aimed at assuaging the fears of Washington's Arab partners that the U.S. is abandoning the region or walking away from the fight against the Islamic State group.

"These have been folks that have fought with us and it's important that we do everything we can to ensure that those folks that fought with us are protected," Pompeo said of the Kurds while visiting Irbil, the capital of Iraq's semi-autonomous Kurdistan region, after talks in Baghdad.

His comments were similar to those made earlier in the week by Trump's national security adviser, John Bolton, who said on visits to Israel and Turkey that protecting the Kurds is a priority for the U.S. even as it moves to withdraw some 2,000 American troops from Syria.

Bolton's comments drew a quick rejection from Turkish President Recep Tayyip Erdogan, who said they were a "serious mistake" and that Turkey "cannot make any concessions in this regard." Turkey regards the Kurds as terrorists and has vowed to attack them.

Pompeo, however, downplayed Erdogan's response to Bolton and predicted that any differences could be ironed out in upcoming talks between the U.S. special envoy for Syria, Jim Jeffrey, and Turkish and Kurdish officials.

"Erdogan has made commitments; he understands that - I think he uses the language - he talks about he has no beef with the Kurds. We want to make sure that that's the case, and I'm confident that as Ambassador Jeffrey and others travel through the region in the days ahead, we'll make real progress on that," Pompeo said.

Still, Turkish Foreign Minister Mevlut Cavusoglu said Wednesday that Turkey will not refrain from military action to protect its borders from what he describes as threats posed by Syrian Kurdish fighters.

The Turkish rebuffs continue to amplify a rift between the NATO allies and raise new questions about how the United States would protect fighters who are U.S. allies in the war against the Islamic State group.

Earlier in Baghdad, Pompeo said he told Iraqi officials that "the fight to counter Iran is real and important."

Pompeo and Iraqi Prime Minister Adel Abdul-Mahdi discussed efforts to ensure the "lasting defeat throughout the region" of the Islamic State group, State Department spokesman Robert Palladino said.

Pompeo also promoted the U.S. push to move Iraq toward energy independence, said Palladino. Iraq imports electricity and natural gas from Iran to meet its energy needs.

Iran has cultivated close ties with Iraqi politicians and religious and business leaders since the 2003 U.S. invasion toppled dictator Saddam Hussein and destabilized the country. Neutralizing those relations will be a difficult -- and possibly dangerous -- task. Iran has the ear of several powerful Iraqi militias that rival the might of the country's U.S.-funded security forces.

Abdul-Mahdi and Parliament Speaker Mohamed al-Halbousi, who met with Pompeo separately, both said they told the American diplomat that Iraq values good relations with its neighbours.

Pompeo also met with Iraqi President Barham Salih and Foreign Minister Mohamed Alhakim and stressed the U.S.'s support for strong, relations based on the 2008 Strategic Framework Agreement between the two countries.

Pompeo has said the Syria withdrawal would not detract from U.S. efforts to contain Iran's considerable clout in the region. The White House reinstated sanctions against Iran last year for allegedly violating the 2015 nuclear deal championed by former President Barack Obama. International nuclear inspectors had said there was no evidence that Iran was violating the deal.

Pompeo's visit is the third high-profile visit by an American official to Iraq in the last month. Iraqi politicians were incensed when Trump last month made an unscheduled visit to a U.S. base in western Iraq without also meeting Abdul-Mahdi, as his predecessors Obama and George W. Bush had done.

Trump said on his Dec. 26 visit that the United States could use its bases in Iraq as a platform for continued operations against the Islamic State group in Syria.

The visit left lawmakers smarting and prompted calls to annul a 2014 agreement that brought U.S. forces back to Iraq. Some 5,200 U.S. troops are now stationed in the country.

Earlier in December, U.S. Energy Secretary Rick Perry urged Iraq to sever its energy dependence on Iran and open its energy sector to American investment. He was in Baghdad with a trade delegation arranged by the U.S. Chamber of Commerce.

------

Lee reported from Cairo.