Ankara’s decision to throw away years of negotiations with the Kurdish nationalist movement in Turkey is both irresponsible and perverse. It seems likely to add to the dangers and uncertainties that the collapse of state authority in Syria and Iraq have brought to the wider region and it could have ominous implications for Turkey’s internal politics. Since the emergence of the modern state after the first world war, the relations between the ethnic Turkish majority and the Kurds, the country’s largest minority, have been the single largest problem faced by the country. Ankara originally tried to solve it by suppression and compulsory assimilation, hoping that in time Kurds would become indistinguishable from the rest of the population. The predictable result was resistance, in the early years in the form of sporadic revolts and, in the late 1970s, in the form of the Kurdistan Workers’ party, or PKK, an armed separatist movement.

A debilitating war, inside Turkey and across the border in northern Iraq, followed, until both sides, informally and then formally, began to look for a settlement, a process aided by the capture of the PKK leader Abdullah Öcalan. The Turks liberalised their cultural policies, while the PKK foreswore separatist aims in favour of autonomy. In 2013, Mr Öcalan released a letter calling for a ceasefire and an end to armed struggle.

The commitment of Recep Tayyip Erdoğan, then the prime minister, now president, was never absolute. Mr Öcalan, both a contradictory and a charismatic figure, was also an unpredictable quantity. But a peace process was nevertheless under way. Turks and Kurds had their first full taste of normality and non-violence and began to feel this was the shape of the future.

Then came two developments which put the process in jeopardy. The Syrian and Iraqi conflicts, among their many consequences, had the effect of strengthening the Kurdish communities in both those countries. The Iraqi Kurds achieved an almost complete de facto autonomy as Baghdad lost control, while the Syrian Kurds, allied to the PKK, also became more their own masters. The Turks feared their example would make their own Kurds more demanding. The second development was the failure of Mr Erdoğan’s plan to perpetuate his rule in Turkey by bringing in an executive presidency. That crashed at the general elections in June, not least because of the success of the Peoples’ Democratic party, or HDP, which is the main legal Kurdish party. It has some links with the PKK, but it also garnered many non-Kurdish votes in the poll. It seems likely that the increasingly wilful Mr Erdoğan is seeking ways in which to reverse this defeat.

This is the background against which the decisions to attack Islamic State bases in Syria and PKK bases in Iraq, to let the United States use Turkish airfields, and to arrest alleged members of the two movements in Turkey, must be viewed. There may or may not have been some PKK provocation, but the direction of events is clear. Turkey has used its switch on policy toward Isis as camouflage for a more fundamental shift on the Kurds. Mr Erdoğan wants out of the peace process, which he has declared at an end, and he appears bent on undermining the HDP and its leader, Selahattin Demirtaş. The launching of a legal investigation into Mr Demirtaş’s recent actions suggests this may be the case. The end in mind is presumably a return to the country for fresh elections which will bring a better result for Mr Erdoğan.

If so, this is a dangerous course, both internally and externally. It has already endangered Turkey’s relatively good relations with the Iraqi Kurds, who have protested against the raids on the PKK. Worse, it could damage Turkish democracy and diminish the chances of a settlement, which the country needs as much as ever.