Turkey feels as if it’s reliving an old nightmare. Each morning television presenters and newspaper headlines glumly round up news from the Islamic State (Isis) siege of the Syrian Kurdish town Kobani, and its spillover into Turkey. three Riots, tear gas, and live fire this week have killed more than 20 people in cities in Turkey’s Kurdish south-east. There have been multiple arson attacks on cars, buses and trucks, ethnic tensions, street corner nationalist gangs, curfews and armed troop deployments unseen since the miserable years of all-out Turkish Kurd insurgency in the 1990s.

At the same time politicians have begun shrilly pouring doubt on the vital, nine-year-old peace process between the Turkish government and the Kurdistan Workers’ Party (PKK) insurgents. This reached an apex of absurd conspiracy when both sides began labelling each other as being “the same” as Isis, a group which is actually their mutual enemy.

A tragedy has indeed engulfed Kobani, but little fundamental has changed just because, unusually, TV cameras lined up on the border are able to record first-hand one scene within the larger epic of the Syrian disaster.

The hard truth is that the Syrian Kurds and their main Democratic Union party (PYD) militia were always vulnerable and ultimately unable to defend Kobani alone, puncturing a moment of Kurdish hubris after a summer of impressive progress. Their isolation is partly because PYD and the PKK, with which it is umbilically linked, have insisted on a level of autonomy that is controversial, both in Turkey and with the Syrian mainstream opposition.

Nor is Turkey free to drive its tanks down the hill to save Kobani, as demanded by Turkish Kurd politicians. Breaking international law by crossing a border would weaken Turkey’s international position (as with Russia in Ukraine), set off angry regional reactions from backers of Damascus such as Iran and Lebanon’s Hezbollah, and could lead to Syria itself firing missiles at Turkish cities. Turkey may be a member of Nato, but the airstrikes are not a Nato operation; Nato is supposed to be a defensive alliance, and is unlikely to back a unilateral Turkish move.

Turkish action around Kobani would also mean armed confrontation between Turkey and Isis. The Turkish armed forces are absolutely unprepared for any long-term foreign operation. With its porous, 570-mile long Syrian border, Turkey has everything to lose in such an open-ended conflict, and Turkish soldiers would certainly die on a mission that most Turks would not understand let alone support. Where would Turkey’s military have to stop in Syria to make its border secure? Do jihadi sleeper cells lurk among its 1.5 million Syrian refugees, ready to target the tourist industry that powers 10% of Turkey’s economy? Would taking sides against Isis – the principal Sunni militia in the Syrian war – risk a reaction from Turkey’s own Sunni heartland, which has already sent hundreds of Turks to fight in Isis ranks?

Turkey cannot order the ethnic, sectarian and political faultlines of the Middle East to stop at the Turkish border. Certainly, Turkey made mistakes: betting too big on the quick ousting of Bashar al-Assad, and opening its border to all who would fight against Damascus – a policy it is only beginning to reverse. But these policies are similar to those of western actors. It is not fair to make Turkey both the viewing platform and the sole scapegoat for the dysfunctional international system that has exacerbated the Syrian war.

The Turkish government and the Kurdish national movement should therefore discuss what they can themselves do, not what they would like others to do. Both sides actually identify Isis as their deadliest enemy, abhor Isis tactics, broadly favour friendship with the west, and adhere to an ideal of secular governance. Both sides’ favoured scenario is a partnership between Turks and Kurds. They share a long common history, a common Sunni religious tradition, and are interconnected in a way that would be hard, if not impossible, to unravel.

The only way to make this partnership happen is to complete the peace process fitfully under way since 2005. All the necessary elements are in place for a breakthrough to end a 30-year conflict that has already killed 30,000 people. A ceasefire has held since March 2013. Strong leaders on both sides could implement a deal. Popular support is significant. Notorious south-eastern jails are now being made into remembrance museums. The Kurdish language, previously prohibited, is spreading in the media and public life. And above all, a decade of normalisation has empowered both Turkish and Kurdish middle classes, laid new roads and brought new prosperity all over Turkey.

It has not been easy to dispel mistrust. From the 1920s to the 1980s, Turkey denied the existence of Kurds, calling them “mountain Turks”. Police torture in the 1980s and death squads in 1990s killed and traumatised Kurdish activists. Even in 2009, nationalists in the Turkish judiciary undermined the government’s efforts by arresting thousands of Kurdish political activists, including elected mayors, on terrorism charges. Subtler discrimination in workplaces, public spaces and house lettings remains rife.

But since direct talks started between the jailed Kurdish leader Abdullah Ocalan and the Turkish state in late 2012, there has been improvement. Reform laws have brought legal protection to the peace process. Delegations of Turkish Kurd MPs travel from Ocalan’s prison island in the Marmara Sea south of Istanbul to the PKK’s mountain headquarters. On 1 October the government announced a proper framework, a cross-ministerial board under the prime minister with 11 sub-commissions.

Still, progress remains much more of an avalanche of initiatives than a structured process. Neither side trusts each other enough yet. Ankara sometimes seems to be regally granting small concessions to the Kurds and resenting legitimate demands. And the PKK finds it very hard to commit publicly, as it must, to eventual disarmament within Turkey; to a wish to join the whole country and act through the political capital, Ankara; or to state clearly whether, as its actions on the ground often suggest, it retains a secret urge to push for an independent state under PKK control – a goal for which there is no economic, geographic, social or consensus among Kurds, let alone the majority Turks.

A Turkish-Kurdish partnership is achievable, and should not be put at risk by political grandstanding over the ruins of Kobani. If its defenders are doomed, the town’s remaining population should be safely evacuated to the Turkish border, like the 150,000 who have already passed through. But whatever happens to Kobani, it is only by sorting Turkish and Kurdish differences inside Turkey that the two sides can begin thinking the unthinkable about facing Isis together. And the time to begin negotiating that compromise is now.