The route that takes an enemy of the state on to the global stage as a national icon can be as short as the flight from Istanbul to Frankfurt. This week, Turkey is enjoying its status as "country of honour" at the 2008 Frankfurt Book Fair. The programme, backed by the government in Ankara, began with an address by a writer who knows that parts of his country's armed forces once plotted to assassinate him. Orhan Pamuk may have won the Nobel Prize for literature in 2006, but in that year he also survived a prosecution for "insulting Turkish identity", under the infamous but now reformed Article 301 of the penal code, after he spoke abroad about the Armenian massacres of the First World War.
Pamuk's role at the head of the 300 writers and 100 publishers who are showcasing the multi-cultural "colours" of his country's life and arts at the book world's annual marketplace highlights the Turkish paradox: a country where state and government often pull fiercely in opposite directions. Pamuk's swing from ostracised zero to poster-boy hero is another odd outcome of the stand-off between the elected, soft-Islamic government and the "deep state" – with its strongholds in the army and courts.
In recent months, Turkey has been riveted and outraged by revelations from the so-called "Ergenekon" scandal: the latest evidence of the army's chronic itch to meddle in politics and society in order to protect the secular nationalism of the state founded by Ataturk in the ruins of the Ottoman empire. As for the justice system, in July the supreme court avoided by one vote a calamitous decision to ban the ruling AKP party, which has Islamist roots, for violating the constitution. Indeed, six judges out of 11 voted to outlaw a movement that won 47 per cent of the vote and a crushing majority in the 2007 elections – but seven was the majority required.
The Ergenekon exposés and shocks, such as the murder of a Turkish- Armenian newspaper editor Hrant Dink in 2007, have given Pamuk and other free-thinking writers a local boost after years of being treated as unpatriotic whipping-boys by vindictive courts and their tabloid allies. "I think the bad times are over for me now," Pamuk told me in his flat overlooking the Bosphorus in central Istanbul. When his new novel, The Museum Of Innocence, appeared, he says, "for the first time, the Turkish media gave me a sweet reception". Now, the culture ministry has sanctioned a Frankfurt Book Fair pitch celebrating the diversity of Turkey's cultural heritage – Kurdish, Jewish, Armenian, gypsy and Anatolian Muslim. A committee chaired by the radical publisher Muge Sokmen has shaped the "country of honour" jamboree. For Pamuk, the AKP government's long-held desire to join the EU means it knows it has to put on a pluralist face "in order to be more attractive, to appear more European".
Pamuk, like many of Istanbul's most liberal and cosmopolitan artists, is not as worried as outsiders about how deep the AKP's pluralism really runs. For them, the real threat still lurks among the hard-line secular chauvinists in the army and judiciary who have for decades banned and jailed authors and journalists. Perihan Magden, an outspoken popular columnist, thinks readers see her as a "national bitch" as well as a successful novelist.
She also suffered an Article 301 prosecution in 2005 for defending the right of a conscientious objector to refuse military service. "I don't see a fundamentalist threat in my country," she says. "I don't think the AKP has a hidden agenda. They're not hiding in the closet ready to jump out at us." Even if they merely follow the old maxim of "my enemy's enemy is my friend", Turkey's frankest authors clearly distrust behind-the-scenes ultra-secularists more than upfront, vote-chasing Islamic politicians. "I'm not pro-AKP," adds Magden. "I'd never vote for them. But as long as they are democratic, I support them."
Elif Shafak, a best-selling novelist indicted and then cleared in court for the Armenian themes of her novel The Bastard Of Istanbul, recently joined other writers for lunch with Turkey's AKP president, Abdullah Gul. Often treated with suspicion in Europe as a crypto-Islamist, he is controversial at home as well, not least because his wife wears that most emotive of Turkish garments, the headscarf. For Shafak, this dialogue "is symbolic, but in this country, symbols are important". Her writing aims to build cultural bridges and to show the gulf between Muslim and non-religious Turkey may not run as deep as outsiders imagine. In ordinary homes and in the streets, "They manage to co-exist," she says. "I feel that's healthy – but the elite draw the boundaries more clearly. Real life is more fluid."
For Frankfurt organiser Muge Sokmen, whose publishing company Metis is still "harassed" by cases under Article 301 even after its terms were tightened up in April, the fair should at last allow observers to see a hybrid Turkey. Above all, she wants to tell the story of a people more creatively mixed up than foreign headlines ever admit. "The outside world presents Turkey as either black or white. Our colours are never seen". This week, Orhan Pamuk is opening the paintbox.
Dissident Turks: Writers who fell foul of the law
A columnist for Rakidal newspaper and Aktuel magazine, Magden, 48, has published poetry and novels, including The Companion, Messenger Boy Murders and Two Girls. In 2006, she was prosecuted but acquitted for defending a conscientious objector who refused military service. Last year, Magden received a suspended sentence for "defaming" a provincial governor.
The columnist and writer was born to a diplomatic family in 1971 and has published seven novels, including The Flea Palace and The Bastard Of Istanbul, whose discussion of Turkish-Armenian history provoked a court case in 2006 that led to her acquittal on an Article 301 charge. Her new book is a memoir of surviving post-natal depression.