BEIRUT/ISTANBUL (Reuters) - Fighting between Turkey and Kurdish militias in northern Syria is complicating plans to drive their mutual enemy Islamic State from its Syrian capital Raqqa, an operation U.S. officials have said may start within weeks.

A Kurdish fighter from the People's Protection Units (YPG) carries his weapon as he stands past a tank in the Ghwairan neighborhood of Hasaka, Syria, August 22, 2016. REUTERS/Rodi Said - RTX2MKNR

Turkish jets and armor, in support of Syrian rebels, have struck Kurdish fighters in recent days as both sides compete to capture land from Islamic State that Ankara wants as a buffer zone against militants near its border.

Those clashes could foreshadow a wider battle as they also eye control over Manbij, a city northwest of Raqqa. This was taken from Islamic State in August by local fighters backed by Kurdish groups, and offers strategic control over a large area.

The push against Islamic State is crystallizing such fears, with Syrian Kurdish leaders anticipating a “stab in the back” from Turkey if they join the Raqqa operation. For its part, Ankara says the Kurds’ main militia should not be involved at all.

This underscores the difficulty of orchestrating a broad push against Islamic State in a region that is home to Arabs, Kurds and Turkmen, and where regional politics and a fear of ethnic cleansing make it harder to build stable alliances.

Syria’s civil war pits President Bashar al-Assad, backed by Iran, Russia and some Shi’ite militias against mostly Sunni Arab rebels backed by Turkey, Gulf monarchies and the United States. A secondary conflict puts all of them at war with Islamic State.

However, the focus on driving Islamic State from Raqqa is growing ever more urgent as Iraq’s army and Kurdish forces push toward Mosul, about 370 km (230 miles) to the east across the Iraqi border. This is encouraging the jihadist group to fall back on Raqqa as the seat of its brutal rule.

The forces closest to Raqqa at present are those of the Syrian Democratic Forces (SDF), an alliance of militias in northeast Syria of which the strongest is the Kurdish People’s Protection Units or YPG, regarded by Ankara as anathema.

Western officials have said the operation to take Raqqa, a predominantly Arab city, should be mainly conducted by Arab forces. Turkish President Tayyip Erdogan said on Wednesday the YPG should not take part, while maintaining that his own forces should be involved in the assault.

The top U.S. commander in Iraq, Army Lieutenant General Stephen Townsend, said on Wednesday that the SDF was the only force capable of isolating Raqqa any time soon and insisted that the YPG would be involved in that operation.

But he acknowledged Ankara’s opposition and said the United States and Turkey were holding talks on the issue. U.S. Defense Secretary Ash Carter said he was looking for ways Turkey could take part in the Raqqa operation and praised its intervention in Syria so far for taking territory from Islamic State.

Syrian Kurds lay no claim on Raqqa, said Saleh Muslim, joint head of the Syrian Kurdish PYD party, but he told Reuters its “liberation is a priority for the Kurds”, adding that those who rule there “at least should be friends of ours who would not attack us”.

SEPARATIST

What most alarms Ankara in northern Syria is the predominance of the YPG militia and the political party with which it is associated, the PYD or Democratic Union Party.

Turkey regards both as extensions of the Kurdistan Workers Party (PKK), a separatist group that has waged a three-decade insurgency to push for Kurdish autonomy in southeastern Turkey. It is listed as a terrorist organization by the United States and European Union.

The PYD party and YPG militia in Syria, and the PKK in Turkey, deny that they share direct military or political links, but they are members of a larger alliance of Kurdish groups that promotes the ideology of PKK leader Abdullah Ocalan.

Turkey’s own intervention in Syria in support of rebel groups fighting under the Free Syrian Army (FSA) banner sought to drive Islamic State from positions it had used to shell Turkish towns, and also to stop YPG expansion there.

When Islamic State swept through Syria in 2014, eventually threatening Kobani and Hasaka, cities with big Kurdish populations, the YPG emerged as the strongest group fighting the jihadists.

It soon gained U.S. backing and joined with smaller Arab and Kurdish militias to form the SDF, which over the past year has seized land from Islamic State along the border with Turkey, setting up a de facto autonomous zone.

That zone is ruled by local councils, a system that Ankara regards as little more than a front for control by the PYD and YPG.

INTERVENTION

When Turkey intervened in August, the SDF had just captured Manbij, leaving it poised to close the 70 km (45 mile) gap separating two Kurdish enclaves along the Turkish frontier, something Ankara was determined to prevent.

While it and the FSA rebel groups it backs have captured the border area from Islamic State, the Kurds have a last chance to unite their two regions by taking the town of al-Bab. Their capture of three villages near al-Bab last week prompted the latest round of fighting between them and the Turks.

“Some insist on trying to keep Turkey and the FSA away from al-Bab. We are determined to cleanse Manbij from the PYD as soon as possible. Either they abandon the area as soon as possible, or we will do what is necessary,” Erdogan said on Wednesday.

Turkey has repeatedly insisted that the YPG and PYD should quit Manbij, something that both they and the United States have said has already happened.

The city is run and defended by local civilian and military councils which say they are independent of the PYD and YPG but allied to the SDF umbrella group. Turkey appears to regard that position as dissembling.

If it does take al-Bab, ending Kurdish hopes of uniting Rojava, as Kurds call northern Syria, and then strikes at Manbij, where Kurdish fighters died in the battle against Islamic State in August, it could prompt a big escalation.

For the United States and other Western countries now focused on uniting their allies - who include both Turkey and the SDF - for the battle to crush Islamic State, that would represent a big setback to their plans.