Studying the European media after the failed coup in Turkey was a truly astonishing experience. From the reactions, a neutral observer would not have expected that there was a democratically elected President who just managed to avert a military takeover.
During the night, when tanks were still on the streets in Istanbul and Ankara, there was a thinly veiled kind of "schadenfreude" in some of the TV reports. As soon as the whole affair was over, commentators came heavily down on Erdogan's statement that the coup was "a gift from God."
One does not have to be a friend of the Turkish President to show a bit of empathy with a man who just survived an attack on is life and the political system supported by a majority of citizens. Surely, his clampdown on almost everybody who has been associated with the Fethullah Gulen movement that he suspects to be behind the coup goes too far and smacks of revenge.
But there is no ethical textbook on how to deal with a putsch and only history will tell if Erdogan was justified in his massive cleansing of state institutions. European politicians and media commentators seem to forget that even the possibility of a coup indicates a division bordering on enmity that is not easy to overcome in a country.
In the case of Turkey the division goes back to its founder Mustafa Kemal Ataturk and in many ways, the success of Erdogan's AK Party is a belated reaction to Ataturk's Westernisation project that was never fully completed. Erdogan complained bitterly about the lack of support from democratic countries in Europe - and he is right.
For Europeans, the question arises: why we prefer to make a democratically elected politician in our neighbourhood a bête-noir? Sure, nobody in Europe wants a military regime in Turkey. But the outright condemnation of Erdogan seems to be a case of "blame the victim"- reaction and tells a lot about the psychology of Europe. It also reveals a deeper flaw in European neighbourhood policies.
For Europeans, the question arises: why we prefer to make a democratically elected politician in our neighbourhood a bête-noir?
Regarding the psychology, we need to look a bit at the way how Turkey has been functioning before and after Erdogan came to power. Recep Tayyip Erdogan has been a controversial politician even before he took over in 2003 as Prime Minister. Right from the beginning, political opponents expected him to start a "march through the institutions" in order to turn the secular state into an Islamic republic. If that is his aim or not is still open for historical judgement.
But the democratic credentials of some of his opponents are also questionable. Since 1960 the military has been intervening in Turkish politics - now for the fifth time and some cases were more successful. One of the reasons why the coup failed this time is that it did not enjoy popular support and Turkish citizens came out to the streets to defend democracy.
Erdogan is clearly a very conservative, religious politician by European standards, especially in social questions such as the role of women, alcohol etc. But this also reflects what large parts of Turkish voters think. The country has been deeply divided along these lines since Ataturk managed to create Turkey out off the shambles of the Ottoman Empire. He saw Westernisation as the only way to progress and did not use kid-gloves against those who disagreed.
Erdogan's own authoritarian tendencies, especially the way he treats opposition from journalists, intellectuals and activists as well as minorities such as Kurds and Alevis is of course, highly problematic and poses a severe obstacle in negotiations with the European Union. But at the same time, Turkey's economy has been flourishing under the rule of his AK Party and the country became a democratic role model for many reformers in Muslim countries.
When negotiations with the European Union about a Turkish membership started in 2005, there was a great deal of enthusiasm about this prospect in the country, but not so in Europe. While some of the concerns regarding freedom of opinion and other human rights in Turkey were justified, Turks very quickly gained the impression that Europe actually wanted to stay a "Christian club" and that they are not welcome, based largely on cultural prejudice.
It did not go down well with Turkish pride and the country slowly started to turn away from Europe, although negotiations with the EU are still formally on. The people who have been demanding a stop to the negotiations after Erdogans clampdown on the putschists are in fact trying to kill a dead dog. Much of Erdogans policy in his immediate neighbourhood has to do with the fact that he decided to turn "South-East" after "West" became a more and more unlikely option.
This is all the more regrettable since Europe in 2005 was not bogged down yet by the numerous crises it is facing now but bristling with self-confidence after the collapse of the Soviet empire. But a lack of strategic vision and courage regarding the opportunities that the membership of a Muslim country would have offered, prevented a deal that would have made the map and in fact the political order of the region look very different by now.
For Turkey, EU accession would have accelerated the democratisation process that was nonetheless quite successful - as the failure of the coup proves. For Europe, if would have opened a new chapter of history by peacefully incorporating a Muslim country and thus taking a big step in overcoming centuries of enmity. Europe would have been much better prepared and equipped by now for the integration of refugees because it is a very different endeavour to overcome cultural differences once one has agreed to be part of the same Union.
Unfortunately that opportunity was squandered and the picture has changed dramatically. While German chancellor Angela Merkel, whose Christian Democrats have been among the opponents of a Turkish EU membership, has flip-flopped and opportunistically tries to hold on to the refugee agreement with Turkey, those who never wanted a Muslim country in, are leading public opinion.
Demonising Erdogan has become the flavour of the day. "Sultan" is among the more flattering abuses in the European media that is revealing in its unabashed Orientalism. Erdogan has (even more than Vladimir Putin) become the Oriental "other" that a deeply insecure Europe needs in order to define its identity as democratic and rational.
Ironically, Putin the master-trickster recently welcomed Islam as "a traditional Russian religion", while the monsters of populism and spectres of drowned refugees are banging on the door of European reason that seems, once again to be in deep slumber.
Leaving psychology aside, many of the arguments against Turkey's accession to the European Union are based on culture and geography, not on political interest. Given the amount of turmoil in its immediate neighbourhood, this is a luxury that Europe cannot afford anymore. Speculations about throwing Turkey out off NATO reveal a dangerous lack of realism. The missed opportunity of Turkey's membership in the EU must not be turned into a full-fledged ice-age right now. This is obviously not the best time for a new honeymoon with Turkey, but it is high time to mend fences and develop a better strategy for the future.
The views expressed above belong to the author(s).