In 2002, Recep Tayyip Erdoğan was on the campaign trail, and his party went on to victory in elections a few months later. He spoke in concrete terms of day-to-day life and freedoms of religion, culture, language and expression. The atmosphere was rather good-natured and less nationalistic than at the meetings of certain other parties.

Preparing to join the European Union was, he said, a necessary and useful step, and the best way to reform the country. To foreign audiences he explained that his new Party of Justice and Prosperity (AKP) had transformed and broken with its Islamist, anti-European past.

Eleven years later, during the night between Thursday 6 and Friday June 7, there was none of that talk to be heard. Erdoğan’s references were to the Ottoman Empire. He called on Allah to make “brotherhood”, the “union” and Arab-Muslim solidarity “eternal”, and he played on the Turkish nationalist pride of thousands of his supporters, the “soldiers” who had come to welcome him and declare themselves ready to go “wipe out” the “Vandals”.

The Turkish prime minister had nothing to say about the protests against his government’s authoritarian excesses, against unbridled capitalism, for freedom of expression and lifestyle, of the tens of thousands youth who have been on the streets since May 31.

And not a word about Europe, apart from a few remarks some hours later at a press conference he held jointly with the European Commissioner Stefan Füle. While claiming to be open to the “needs of democracy”, Erdoğan used the conference to accuse the European Union of “hypocrisy” and “double standards”. He complained about the lack of progress in the accession negotiations, a “tragi-comic situation”, and reminded those who would criticise his management of the current crisis that when it comes to democracy Turkey has nothing to learn from “certain European countries”.

Erdoğan’s gloves were off. His remarks were offensive and undiplomatic. To speak that way, the prime minister must have abandoned all hope and desire for European integration.

What happened? The contrast between the man of 2002 and 2013 is starkly clear. Should we be surprised? Or, on the contrary, can we see evidence here, like his most diehard opponents do, of the “double agenda” of Erdoğan and the AKP? Those who, once freed from the tutelage of the Turkish military thanks to the support of the EU, had free rein to roll out a hidden, neo-Ottoman policy, well removed from secular, democratic and Western values.

Coming to power in 2002, the AKP government has continued and amplified a series of substantive democratic reforms that had been initiated by the coalition previously in power. And that astonished their fiercest opponents.

Brussels appreciated it too: Turkey was given a date – October 2005 – for the start of the EU accession negotiations. The AKP presented itself as a “Muslim Democratic” party after the fashion of the Christian Democratic tradition, the most European-minded of the prevailing political currents. Turkey’s joining the European Union would be the “anti-clash” of civilizations, Erdoğan declared.

Ultra-minorities, the liberal left media, and persuaded Europeans, were, without really knowing it, his zealous ambassadors to diplomats and Western journalists. They had finally found, in the AKP, a party that had the courage and means to decapitate their common enemy: the Turkish military (responsible for four military coups in almost thirty years) and to send it back to its barracks.

This momentum and these reforms, however, were soon to come to a sudden stop. It happened from 2004-2005, well before the battle against the military had been won.

There were two reasons. The first is little known, but essential to understanding Erdoğan.

In 2003, the European Court of Human Rights upheld the dissolution by the Turkish Constitutional Court of the Islamic Refah Party, justified because, in Turkey, the party was a threat to democracy. At the same time, though, the dissolution of Communist or autonomist parties was held to be contrary to European law. Erdoğan could not comprehend the difference.

Worse yet, in June 2004, handing down its final decision in the Leila Sahin case, the High Court in Strasbourg upheld the exclusion of the plaintiff from a Turkish university for wearing a veil. It came as a shock to Erdoğan, whose daughters had to leave to study in the United States to keep their veils. There again, he does not understand that what is allowed in most European countries – to wear a veil at a university – is subject to a contrary opinion when it comes to Turkey, where the ban on headscarves in universities is still in place.

And when he speaks of “double standards”, it is essentially these two decisions that he has in mind. Those decisions have weakened his fragile belief that the European Union guarantees religious freedoms.

The second reason is better known. In 2005, the French were to make a statement on the Treaty establishing a European Constitution. Turkey’s candidacy was subjected to a violent campaign of denigration. Turkey played the role of scarecrow, exploited for electoral purposes by President Nicolas Sarkozy, who proposed, with Germany, to offer Turkey a “privileged partnership” – an empty formula for the only candidate country that has signed a customs union agreement with the European Union, and a very long time ago (1995).

If Erdoğan wants to give back to the Turks who elected him some pride, a national destiny, the opposite is happening. This marks him deeply, and he feels humiliated. A vicious circle has begun.

A majority of Turkish officials no longer believe in this European Union that is snubbing them. Turkey has decided to slow, stop or even reverse the liberal and democratic reforms necessary for an integration that remains too hypothetical. It refuses to apply the rules of the customs union to Cyprus, now a member of the European Union, and whose northern part it still occupies.

Since October 2005, 13 of the 33 “chapters” have been opened for negotiation, but only one has been closed. Since June 2010, no new “chapter" has been opened. In July 2012 Ankara suspended all contact with the European Union during the six months that Cyprus, which Ankara still refuses to recognise, held the presidency of the European Union.

Erdoğan now finds himself in a quasi-schizophrenic situation regarding the European Union. On one hand, he is becoming aware that the Ottoman dream has not seduced his Arab neighbors, and that the influence of Turkish diplomacy in the region is in good part due to Turkey’s strong Western backing. On the other, it has now become almost impossible for him to admit to his public that integration with Europe would be, in the end – economically and diplomatically, in any case – the best thing that could happen to Turkey.