On Wednesday, some 2,000 Turkish Kurd guerrillas will begin their withdrawal from Turkey to an inaccessible mountain stronghold in northern Iraq. Moving in small groups, the fighters will take one to two months to retreat, assuming the Turkish army sticks to a de facto ceasefire, says a leader of the Turkish Kurd rebel movement, the PKK (Kurdistan Workers Party). The pullout is the first step in a fragile process of reconciliation between the Turkish state and its Kurdish minority after 29 years of guerrilla war in which 40,000 people have died.

The PKK guerrillas leaving Turkey will head for the Qandil mountains, one of the world’s great natural fortresses, in the Kurdish autonomous region on the Iraqi side of the border with Iran. Still keeping their weapons, they will wait in camps hidden in deep valleys and gorges to see if Turkey reciprocates by ceding a share of power to its Kurdish minority, which numbers some 14 million and is concentrated in the south-east.

Sabri Ok, a member of the PKK leadership, said in an interview with The Independent in a safe house in Qandil that some fighters believed that if “we continue our armed struggle we could get results”, but there has been no real opposition to a peace understanding. Negotiated by the PKK’s leader Abdullah Ocalan, held in the Turkish island prison of Imrali since 1999, the peace terms are vague. But, ever since they were read out to a crowd of one million Kurds gathered in Diyarbakir, the largest Kurdish city in Turkey, on 21 March, there is no doubt about their swift implementation by the PKK. A ceasefire was immediately declared, which Mr Ok affirms the Turkish army is sticking to. He says “there are some drones and warplanes flying, but not as many as before and there are no attacks”. This restraint is very different from the last PKK unilateral withdrawal from Turkey ordered by Mr Ocalan in 1999 when its fighters were mercilessly harassed by Turkish forces and suffered heavy losses.

Download the new Independent Premium app Sharing the full story, not just the headlines

Mr Ok, a middle-aged man who has spent 22 years in Turkish prisons, admits that quite a lot could go wrong. Asked what would happen if the Turks attacked the retreating guerrillas, he replies firmly that “if there are any bombardments, anything at all, the withdrawal will stop immediately and our guerrillas will retaliate”. In such a case, the PKK hopes that the world will conclude that “Turkey wants war”.

Overall, there is an expectant mood among PKK militants and the Kurds in general in the belief that the political geography of the Middle East is changing in their favour. The 20th century treated them harshly, the post-First World War settlement denying Kurds self-determination and turning them into a persecuted and unrecognised minority without a state, spread between Turkey, Iran, Iraq and Syria. So far the 21st century is turning out to be much more friendly to the 30 million Kurds in the region. Svelte Iraqi Kurdish politicians sitting in Erbil, the capital of the Kurdistan Regional Government (KRG), use almost the same cautiously enthusiastic words as grizzled PKK military commanders in claiming that the Kurds are politically stronger than ever and can no longer be marginalised and persecuted as second-class citizens. “There is a great awakening of the Kurds in the whole region,” says Mr Ok. “The Turkish state and army tried to finish us and they failed.”

And it is not just in Turkey that the news for the Kurds is good. In Iraq, the Kurds are better able to assert their national independence than many members of the United Nations. There is an economic boom as foreign oil companies pour in. The civil war in Syria is enabling the Kurdish 10 per cent of the population concentrated in the north of the country to seize control of their towns and villages and lay the basis for future autonomy.

In the warm spring weather in the Qandil it is not obvious that its meadows and mountains were until very recently a battlefield. The steep hillsides are green with thick grass and dwarf oaks, while behind them rise mountains where black crags stick out from the melting snow. Herds of black-faced sheep and goats graze in the fields and there is the sound of cow bells. An old Iraqi military road zigzags up the side of a mountain above a gorge until it reaches a pass that is one of the few entrances to the Qandil. It looks peaceful enough but at a sharp bend there is a commemorative shrine with pictures of a Kurdish family killed when their car, its mangled wreckage still visible in a shed nearby, was hit by a rocket from a Turkish aircraft in 2006.

No army could expect to fight its way into the Qandil without the risk of suffering devastating casualties. Its caves, canyons and heavily wooded valleys have provided sanctuary from Turkish air attacks. The official PKK spokesman Roj Welat denies that their fighters ever suffered many losses from hostile aircraft, which is likely enough given the broken terrain. Some civilian buildings were not so lucky and Mr Welat points out the pancaked remains of the Qandil Youth Centre, hit by a rocket earlier this year. Rubble is strewn across one end of the centre’s football field where a single goal post survives.

A little further on is the shattered ruins of a house and an outhouse owned by a man named Mam Kokha Kadir. He has now moved to the safety of the plains below Qandil, his former neighbours speculating that the purpose of the air attacks was to drive out the civilian population of the mountains “rather than kill the guerrillas”. Turkey has used aircraft and ground troops for decades to make fruitless forays into northern Iraq in pursuit of the PKK, the main aim apparently being to show the public back in Turkey that the PKK was being given a bad time. The PKK was never going to win a ground war inside Turkey and the movement’s greatest achievement has been to survive repression of extreme ferocity. Founded in 1978 by Abdullah Ocalan as a Marxist-Leninist party, it was for many years dedicated to seeking a separate state for Kurds by means of armed revolt against a state that refused to admit Kurds existed as a separate nationality. It launched a campaign of armed struggle in 1984 that has continued, broken by a few unilateral ceasefires, until today. From the beginning the Turkish army and security forces retaliated with mass arrests, executions and death squads.

Some 3,000 Kurdish villages were destroyed by the Turkish army in the 1990s and at least one million Kurdish villagers driven from their homes. Torture was common with prisoners beaten half to death, thrown into vats of excrement, sodomised with batons, savaged by dogs and subjected to other medieval torments. Prisoners report that to avoid being tortured they were compelled to shout “I am proud to be Turkish” and “a Turk is worth the whole universe”.

The Turkish security forces believed that the capture of Mr Ocalan in 1999 must lead to the collapse of the PKK. This seemed to make sense; he was notorious as the movement’s ruthless and authoritarian leader. But instead of becoming irrelevant in his prison cell, Mr Ocalan has remained in control of the PKK which now seeks autonomy rather than separation. In the eyes of many Kurds his imprisonment gave him the allure of a martyr who became a symbol of Kurdish suffering and resistance. Stencils and pictures of the face of the PKK leader stare out from rocks and cliff faces in Qandil and are carried at every Kurdish demonstration in Turkey. I visited a cemetery filled with the graves of PKK fighters in a pretty valley where one gravestone bears the name of Kemal Aslan, who burned himself to death in 2011 to protest against “the illegal capture” of Ocalan in Kenya 12 years earlier.

The PKK survived as a symbol of the determination of Turkish Kurds to establish their identity and win equal political and social rights. It bounced back after so many setbacks and defeats because the Turkish state used collective punishment against Kurds as a whole and punished moderate dissidents as terrorists, while offering no concessions. Elected Kurdish officials, journalists, human rights workers and activists were jailed. Ten years ago the PKK seemed to be becoming isolated and irrelevant, but events showed that it had not lost its popular support or organisational strength. Mr Ok says with some pride that “the PKK is enjoying the most powerful period in its 30-year struggle”.

Is the armed struggle coming to an end? A message from Mr Ocalan read out to the vast demonstration in Diyarbakir in March said that a new Turkey is being born and it is “time for the guns to fall silent and for ideas to speak”. This might happen but is not inevitable. Self-interest should impel the Turkish state to conciliate the Kurds in Turkey as well as in KRG and northern Syria, but Turkish rhetoric still has to be matched with action such as the release of Kurds from prison, an end to the all-embracing anti-terror law and constitutional changes.

Some Kurdish politicians in northern Iraq argue that the PKK has made a mistake in making their concessions up-front leaving them with little leverage against Turkey in future. Mr Ok says that if Turkey continues repression despite PKK concessions “it will not be good for them, it will not be good for anybody”. If the guerrilla war resumes it may escalate because the PKK can look for support to Turkey’s growing list of enemies in the region such as Iran and Syria. Turkey could, and should, end its draining and unwinnable conflict with its Kurdish minority, but this does not mean it will do so.