U.S. Defense Secretary Jim Mattis is set to visit Ankara, Turkey in the coming days as part of a tour of the region. Mattis’ visit comes as bilateral relations between the two NATO allies are strained over Washington’s support of Syrian Kurds, whom Ankara considers terrorists.

“Turkish relations are as bad as they can get,” said former senior Turkish diplomat Aydin Selcen, who served in Iraq and Washington. “But the fact Turkey’s position on the world map is extremely important, one can look on the map and see without Turkey it will be difficult for the U.S., if not impossible, getting rid of ISIL from Iraq and Syria,” said Selcen, using an acronym for Islamic State.

Analysts suggest Mattis’ first task is in seeking to prevent a further deterioration in relations; but, video this month of convoys of U.S. arms being delivered to the Syrian Kurdish YPG militia enraged Ankara.

The YPG is engaged in fighting as part of a coalition known as the Syrian Democratic Forces, or SDF, which seeks to oust Islamic State militants, Raqqa, Syria, IS’ self-declared capital. Ankara accuses the YPG of being terrorists linked to the PKK, which is fighting the Turkish state.

“The PKK is a Marxist-Leninist organization supported by the United States. Look at this irony and they are trained in American camps,” said Turkish presidential spokesman Ibrahim Kalin. The U.S. considers the PKK a terrorist organization.

“The [Turkish] regime will never accept the explanations of Washington regarding the military support to the YPG,” said political scientist Cengiz Aktar; but, experts suggest that there is a realization in Ankara that Washington will not reverse its policy given its success, with around half of Raqqa already captured by the YPG.

What happens after Raqqa’s fall is predicted to be a key part of Mattis’ talks in Ankara.

“One of [Ankara’s] priorities will be to stop the arms going to the YPG ending up in the hands of the PKK,” said Unal Cevikoz, former Turkish ambassador and now head of the Ankara Policy Center. “The second issue with end game approaching in Raqqa, when IS is eradicated from Raqqa, Turkey will probably ask for the post-Raqqa administration be given to the Sunni Arabs rather than YPG.”

Ankara accuses the forces engaged in capturing Raqqa as predominantly Kurdish and unrepresentative of the local population.

“The Turkish regime wants to destroy the de facto federated government of the Syrian Kurdish in the north of Syria. This is a long-term strategy of Ankara,” said political scientist Aktar.

Turkish military forces are already massed around the Syrian enclave of Afrin, which is under YPG control. Turkish President Recep Tayyip Erdogan has repeatedly warned of an imminent operation against Afrin.

“The U.S. does not want Turkey to intervene because it fears it will interfere with the operation in Raqqa,” said former ambassador Cevikoz. “The issue will likely be discussed during Mattis’ visit, but I think there will be no agreement with both sides agreeing to disagree. But Turkey is trying to coordinate the possibility of an operation in and around Afrin and also Idlib, with Iranian and Russians, so it’s not just a U.S.-Turkish issue.”

Ankara is already coordinating with Tehran and Moscow as part of the Astana agreement process to resolve the Syrian civil war. Idlib is one of the last remaining regions under Syrian rebel control.

The future of Idlib is also a potentially contentious issue during Mattis’ visit.

“The American concerns are very serious that Idlib is hosting a lot of jihadists. What is much more important is there are some 10,000 al-Qaida members in Idlib, but I think Russia and Turkey will ask the Americans to leave Idlib to their control,” said Cevikoz.

Ankara’s growing cooperation with Moscow and Tehran at a time of strained relations with its Western allies has led to growing questions over where its loyalties ultimately lie; but, an independence referendum next month by Iraqi Kurds will offer Mattis some common ground with Washington and Ankara, both having voiced opposition to the vote.