Shortly before the double suicide bombings shook Turkey, its rulers held a party to crown the celebrations of the republic's 80th anniversary. Its prime minister, Recep Tayyip Erdogan, was to be guest of honour. But there was a problem. Emine, his headscarved consort, simply didn't look the part. In her veil and ankle-length dress, she would make Mustapha Kemal Ataturk, Turkey's secularist founder, turn in his grave. One of the general's first policies in 1923 was to ban the veil, along with the Arabic script. President Ahmet Necdet Sezer hoped the prime minister didn't mind, but he was going to drop Emine from the guest list.
In fact, the president decided not to invite the wives of any of the devout Muslim MPs who represent the ruling Justice and Development Party (AKP) in parliament. The spouses of opposition MPs went instead.
The incident was a reminder that, a year after Erdogan's spectacular electoral victory, Turkey's military, judicial, media and bureaucratic establishment still regards his neo-Islamist party with suspicion. Until his political conversion three years ago, Erdogan was a radical Islamist who told his followers that it was impossible "to be a secularist and Muslim at the same time" and, as mayor of Istanbul, he banned alcohol from cafes and bars. In 1999, he was imprisoned for five months for "inciting hatred on the basis of religion" after he had read a poem to a rally that included the lines: "The mosques are our barracks, the domes our helmets, the minarets our bayonets and the faithful our soldiers."
The bombings have seemingly brought a strong reaffirmation of Turkey's commitment to westernisation. Erdogan, like Jack Straw, has gone out of his way to underscore the point that Turkey needs to join the EU. Once Ankara gets in, then Muslim capitals in the Turkic republics of the former Soviet Union and across the Middle East will want to follow suit, he argues. It was why Islamic zealots such as al-Qaeda had chosen to attack the country.
In the past year, Erdogan's government has made more political, economic and human rights reforms than most previous governments put together. But not everyone trusts these modernising Islamic policies. Many still fear that Erdogan and his sharp-suited associates are secretly bent on destroying the sacrosanct constitutional divide between mosque and state introduced by Ataturk. They argue that Erdogan now endorses the EU not because he is a genuine democrat but because he sees it as a sanctuary from the excesses of the secular Kemalist state, and particularly the power of an army still prone to interfere in politics. How else can one explain the leader's controversial decision to appoint Senol Demiroz, an Islamic militant, as head of state-run television and radio?
Under pressure from his own Islamic-leaning media, Erdogan has refused to label the terror as either Islamic-inspired or the work of al-Qaeda. Instead, he says, the atrocities appear to have "religious motives". He has spoken about the killers in the oddest of ways.
Addressing a funeral for victims of the attacks, Erdogan described the four suicide bombers as "citizens". Any mention that they had trained as jihadis in Pakistan - along with an estimated 1,000 other Turkish warrior volunteers - and fought in the battlefields of Bosnia, Chechnya and Afghanistan was ignored.
If Erdogan is really going to bring Turkey's terrorist menace under control he will, it seems, have to face up to some ugly truths - and many of them lie among his own followers.
Helena Smith is a foreign correspondent for the Guardian