ABDULLAH OCALAN, the Kurdish rebel leader and sole inmate of a Turkish island prison since 1999, should by now “have become a perfect irrelevance, the living dead, a Kurdish Ariel Sharon. And yet he had not. His every delusional sally, every spasm of self-pity and promotion was greeted by his supporters as evidence for an ability to outsmart his jailers.” Thus wrote a puzzled Christopher de Bellaigue, a British author (and a former correspondent for this paper) in “Rebel Land”, a tale of eastern Turkey published in 2009.

Five years on, Turkey is banking on Mr Ocalan’s continued grip to end the 29-year-long rebellion waged by his outlawed Kurdistan Workers’ Party (PKK). On March 21st, in a calibrated message read out by members of the pro-Kurdish Peace and Democracy (BDP) party to over a million Kurds gathered in Diyarbakir, in south-eastern Turkey, Mr Ocalan heralded the dawn of “a new Turkey”, saying it was time for “the guns to fall silent and for ideas to speak”. Assurances followed that the Kurds no longer had designs on Turkey’s borders. Turks and Kurds ought to “unite under the banner of Islam”.

Recep Tayyip Erdogan, Turkey’s mildly Islamist prime minister, called Mr Ocalan’s prose “positive”. Murat Karayilan, a senior PKK commander in Kurdish-controlled northern Iraq, swiftly declared a ceasefire. The pro-government Turkish media were awash with triumphalism. “The war is over”, assorted screeds declared.

This may be premature. Mr Ocalan did not set any deadlines for the withdrawal of some 3,000 PKK fighters from the mainly Kurdish south-east. Nor did he specifically say they should disarm. In a subsequent interview Mr Karayilan was less diplomatic. His men were as ready for peace as they were for war. The ceasefire needs to be mutually observed and the government must embark on long-promised reforms, he said. Among these is a judicial reform package that would allow thousands of Kurdish activists and politicians, locked up on flimsy “terror” charges, to walk free.

An amnesty for PKK fighters untainted by violence and improved prison conditions for Mr Ocalan are also on the list. Above all, the Kurds want a new “democratic” constitution enshrining their own cultural and political rights. In short, any withdrawal needs to be synchronised with these reforms. None of this will be easy. Seven previous ceasefires have come to naught.

Mr Erdogan is no stranger to risk. He has declawed hawkish generals and jailed hundreds of those who plotted to unseat him. His pro-secular and ultranationalist rivals are pitifully weak. His national spy chief and Mr Ocalan have stitched a deal. (Mr Erdogan’s earlier threats to revive the death penalty may have had an effect.) Its terms were largely dictated by the government. It is rumoured to include assurances that the BDP will back Mr Erdogan’s bid for the presidency next year.

Should he fail, Mr Ocalan may get the blame, which could lead to a splintering of the PKK. “This is Erdogan’s true aim: to drive a wedge between Ocalan and the mountains,” a veteran BDP officials claims. Others speculate that he wants to buy temporary calm in order to secure an easy ride to the presidency.

Mr Erdogan owes his unprecedented heft to his vision and, most of all, to a strong pragmatic streak. It prompted him to embrace Iraq’s Kurds, whose vast energy riches and seemingly limitless hunger for Turkish goods and services are expected to boost growth. In another dramatic U-turn Mr Erdogan decided to accept Israel’s apology on March 22nd for its 2010 raid on a Gaza-bound flotilla, which left nine Turks dead (see article).

Mr Erdogan, whose many ambitions include hosting the 2020 Olympics in Istanbul, must know that a divided and more radical PKK is likely to resort to the sort of terrorism that would make Turkey’s relatively calm cities unsafe. “Solving the PKK problem is not the same as solving the Kurdish problem,” warned Safeen Dizayee, a spokesman for the Iraqi Kurdish statelet. History has shown that until their rights are granted, the Kurds will rise up again and again.