Turkey’s peace process with the PKK (Kurdistan Workers’ Party) began in the first three months of 2013, after nearly four decades of struggle in which an estimated 40,000 lives were lost.

It ended, finally, when President Recep Tayyip Erdogan formally declared it dead on Tuesday this week. He also indicated that the government now intends to launch prosecutions against the pro-Kurdish Peoples Democracy Party (HDP) and its leader, Selahattin Demirel, less than two months after he and 79 others were elected to parliament by six million voters.

How has something which seemed so hopeful ended in this debacle? The short answer is a spate of murders in eastern Turkey that began when 32 left-wing student activists died in a bomb blast at Suruc on their way to Kobane on 20 July. PKK activists, convinced of a secret alliance between the AKP and ISIL (something which the AKP strongly denies), blamed the Ankara government for the deaths and began to retaliate by killing police. After five soldiers and gendarmes died at the hands of the PKK in quick succession, the patience of the Turkish government was exhausted. Retaliation in the form of repeated airstrikes against PKK targets in southeastern Turkey and northern Iraq followed between Friday night and the early hours of Wednesday.

That in turn triggered widespread civil disorder and further killings across the mainly Kurdish southeast of the country. Most worrying of all, the 960km Kirkuk-Iskenderun pipeline, which carries the largest share of Iraq’s oil exports, was blown up on Tuesday on the Turkish side of the border. It has been attacked by Iraqi radicals in the past but this looks like a Kurdish action.

This is the explanation accepted by Turkey’s Western allies, most notably the United States. The State Department insists that there is no coincidence in the fact that the airstrikes began just hours after Turkey signed an agreement with the US to allow its airbases to be used for strikes against IS in northern Syria and Iraq. The US says it had no idea that the strikes would take place, was not consulted or informed, but that Turkey has the right to attack terrorists.

American firmness on this point – in spite of skepticism among journalists and even TV comedians – reflects the US administration’s concern that access to Turkish bases is too great a prize in the war against IS to be jeopardised.

Some Turks, along with the HDP, argue that the Turkish government is striking the PKK mainly in order to be able to take the country through to early elections in the autumn amid a blaze of nationalist support which would restore President Erdogan’s strong overall majority in the assembly.

One of the principal planks of such a strategy, if it exists, would have to be to eliminate the HDP from the next parliament. Under Turkey’s d’hondt electoral system this would mean many more seats for the AKP in a three-party parliament. The AKP’s election setback (it was not a complete defeat in June for it got nearly 41 percent of the votes) was caused by the HDP’s success in winning 13 percent of the votes the first time it ran for office.

The decision, announced by President Erdoğan on Tuesday, to lift the immunities of its deputies and prosecute the HDP, brings that scenario much closer. The Grand National Assembly is due to vote today Wednesday on removing Demirtas’s legal immunity. Since he himself is not opposing it the move looks certain to go through. If - as has happened before with Kurdish parliamentarians in Turkey - he is then arrested and placed on trial, the HDP could lose its only charismatic figure and main voice, possibly for years. A very similar prosecution in 1994 resulted in Turkish parliamentarians of Kurdish origin being locked up for a decade.

All this makes it clear that Turkey is now sailing through very troubled waters indeed with little chance of a political solution to the conflicts which are convulsing its eastern provinces. There is even a risk of intercommunal conflict arising - in the conservative eastern town of Erzurum yesterday, police had to intervene to stop 200 Kurdish construction workers being lynched by locals.

But why did the political process break down so completely? There is now a war of words and mutual accusations taking place between the AKP and the HDP. Demirtas yesterday described how the HDP had acted as the go-between for the government and the PKK’s jailed leader Abdullah Ocalan. The key issue was the removal of PKK fighters from Turkey. The AKP claims the Kurds dodged their obligations - though many undoubtedly left in order to fight in northern Syria in defence of Kobane against Islamic State militants (IS). The HDP says that the government promised a special law to protect them as they withdraw - but then did not keep the promise. There are also conflicting accounts of what went wrong when the two sides reached a deal at the end of 2014 in talks at the Dolmabahce Palace in Istanbul which at the time seemed about to usher in a new period of hope.

The underlying problem perhaps was that the Kurds insisted on things that no Turkish government could give - the release from prison of Ocalan, regional autonomy, and Kurdish language schools.

Things might have gone less wrong if the Turkish government had not refused to play its biggest card - getting the jailed PKK leader Abdullah Ocalan to appeal to his followers for peace. The minister in charge of the Kurdish negotiations since August 2014, Yalcın Akdogan, appears to be an ultra-hardliner. Ocalan has been held incommunicado in recent months, denied contact with the HDP and his lawyers. Intentionally or otherwise, doing so greatly strengthened the hand of those hardline PKK guerrillas wanting a quick return to the armed struggle.

The situation now is that Demirtas still says that if there is a ceasefire, talks could start again. However the AKP says it will fight to the end against terrorism (as under military rule in Turkey, words like “terror” are now used instead of organisational names) and President Erdogan says none of the 78 million citizens of Turkey can expect to be given more rights.

Despite the staunch support for the Turkish authorities coming from Washington, Brussels and NATO, the authorities seem to have painted themselves in to a corner over the Kurdish conflict, a situation from which only the extremists can benefit. It is hard to see how any government anywhere can satisfactorily resolve a conflict in which six million of its citizens are pitted against it, even if - and this is not yet clear - it can establish full military control.

- David Barchard has worked in Turkey as a journalist, consultant, and university teacher. He writes regularly on Turkish society, politics, and history, and is currently finishing a book on the Ottoman Empire in the 19th century.

The views expressed in this article belong to the author and do not necessarily reflect the editorial policy of Middle East Eye.

Photo Credit: A Turkish anti-terror policeman walks through a street in Ankara's historic Ulus neighborhood on July 27, 2015, police said. The operation is the latest in a recent wave of arrests that have seen hundreds of suspected Daesh, PKK and Revolutionary People's Liberation Party–Front (DHKP-C) supporters arrested across Turkey. (AA)