ISTANBUL — Even as US troops fighting alongside the Kurdish-led Syrian Democratic Forces begin closing in on ISIS-controlled Raqqa, the simmering feud between Kurds and Turkey could complicate the war on the militant group, cost the Trump administration one of the US’s most important allies in the region, and spark a new war in Syria.

“Erdogan is now waiting to see how the operation in Raqqa will end,” said Arzu Yilmaz, a researcher on Kurdish affairs at the American University of Kurdistan in Iraq’s Duhok. “If an autonomous Kurdish region will be allowed after the Raqqa operation, a new crisis can erupt.”

Not since the 2003 US invasion and occupation of Iraq has Washington gone forward with a military plan so vehemently opposed by one of its closest allies, and one so crucial to the operation’s success. Analysts say Turkey will likely acquiesce to the US plan though its opposition could lead to a new conflict in the aftermath of Raqqa.

“I can say that Turkey has its military operation options on table,” said Murat Yesiltas, director of security studies at SETA, an Ankara-based think tank close to government.

The anti-ISIS operation against Raqqa began earlier this month. Several neighborhoods in the group’s de facto capital have already been captured using a combination of local fighters and US Special Forces on the ground and US-led aircraft and artillery from above. “ISIS has had almost three years to prepare for this fight, and we expect it to be very difficult,” US Army Col. Ryan Dillon, spokesman for the US-led anti-ISIS coalition, told reporters earlier this month.

Turkey’s opposition to the US Raqqa plan stems from its reliance on the Syrian Democratic Forces, an armed militia dominated by the People’s Protection Units, or YPG. Turkish officials and independent observers say the YPG is a front for the Kurdistan Workers Party, or PKK, which Ankara has been at war with for decades.

While Turkey appears resigned to sitting out the ongoing operation in Raqqa without interfering, Ankara could complicate any settlement afterward.

“Turkey basically wants to prevent YPG from further expanding their territory in northern Syria and moving towards an independent Kurdish state neighboring Turkey,” Ozgur Unluhisarcikli, director of the German Marshall Fund of the United States office in Ankara, told BuzzFeed News.

Goran Tomasevic / Reuters

A YPG fighter fires a mortar round.

The PKK has been battling the Turkish government for autonomy for decades, regularly clashing in the country’s southeast. An offshoot of the PKK believed to be under the group’s control recently warned of impending attacks on tourist sites in Turkey.

“If PKK terror continues and this arises from Syrian territory, Turkey can start a military operation in northern Syria,” said Yesiltas. “If an accident or an attack happens on the Turkish–Syrian border, there can be clashes. Moreover, in the case of an autonomous Kurdish region in Syria, a military operation can be brought to the agenda. What Turkey is trying to do is prevent YPG dominance in Syria.”

Turkey has long voiced its opposition to the US plan, which has created an uncomfortable arrangement that is already straining relations with a country that hosts one of the most significant US military bases on the globe. Erdogan criticized Trump’s decision to send arms to the Syrian Democratic Forces while standing alongside the president at a joint press conference in Washington last month. Turkey asked that the weapons given to the Syrian Democratic Forces be recollected after the Raqqa operation.

“There is no place for terrorist organizations in the future of our region,” Erdogan said.

On May 31, Turkey’s National Security Council made a statement saying that supporting “PKK/PYD-YPG terrorist organization” is not befitting of a friendship and alliance. Last week, Turkish Prime Minister Binali Yildirim said Ankara will retaliate immediately if the Raqqa operation presents a security threat to Turkey.

But there’s not a lot of sympathy for Turkey’s position in Washington these days, especially after DC police issued arrest warrants for 12 of Erdogan’s bodyguards over a melee in the US capital last month. Yilmaz says relations between Washington and Ankara have been “frozen” because of the Raqqa operation.

Lack of clarity by the US on the future of northern Syria and the role of the pro-PKK Kurds has also exacerbated Kurdish concerns. There is still no clear US position on whether to support Syrian Kurds as a political actor, and what sort of arrangement will be made between Arabs politically closer to Turkey and the pro-PKK Kurds in areas liberated from ISIS.

“After the Raqqa operation there will be a power vacuum in a post-ISIS period,” Yesiltas said. “Turkey wants political stability where the Arab-dominated demography will be preserved, and no more PKK dominance. But this seems difficult to bring about.”

Some analysts in Turkey dread that the Trump administration has little idea of the potential firestorm the aftermath of the Raqqa operation will unleash. Sinan Ulgen, chairman of Istanbul-based think tank EDAM and a former Turkish diplomat, said he worries about tremendous blowback from the Raqqa operation. Dillon told BuzzFeed News that the US was aware of Turkish concerns about arming the Kurds. “But we have been very open and transparent in letting Turkey know the details of the weapons and equipment we provided to the Kurdish element,” he said.

But scholars with close to ties to Ankara say the government has little faith in assurances the Trump administration would give about weapons or Kurdish dominance in northern Syria. “There is no guarantee that the weapons provided to YPG won’t end up in the hands of PKK,” he said. “Considering the fact that armed struggle with PKK will continue, this is a risk for Turkey.”

Rodi Said / Reuters

A woman, who fled with others from an ISIS-controlled area, holds up a white flag near Raqqa.

The fear of Raqqa blowback is also pushing Turkey toward US rivals, including Iran and Russia, said Abedelselam Ahmed, a member of the Democratic Society Movement, a political group close to the Syrian Kurds. “When it comes to the battle of Raqqa, the Turkish government is still arrogant,” he told BuzzFeed News.

Syrian Kurds’ growing power can also provoke the opposition of armed Syrian Arab groups. Mustafa Serjari, spokesperson for Al-Moutasem Brigade, a unit of the Free Syrian Army, told BuzzFeed News he worried the Raqqa operation would result in more war rather than peace for Syria.

“At our last meeting with our American friends, we told them that the new administration and its support for the Kurds are angering the Syrian people, and we really regret for the trend,” he said.

But Turkey’s opposition to the Raqqa plan and Kurdish aspirations in general is also alienating it from other regional powers and perhaps unstoppable trends. Even Russia and Iran maintain communications if not cordial relations with Syrian Kurds. Erdogan’s ally Massoud Barzani, leader of Iraqi Kurdistan, has announced a Sept. 25 independence referendum, over Turkey’s strong objections. Turkey might be forced to reconcile itself to growing Kurdish power in the region.

“Turkey is left alone in the region with two allies: Qatar and Iraqi Kurdistan,” said Irfan Aktan, a journalist. “This loneliness isn’t sustainable at all. Kurdish hatred won’t result in any positive outcomes for Turkey. On the contrary, giving up on anti-Kurd policies may open a new door for Turkey’s deep-rooted Kurdish question too.”