Update: Since this article was published Ahmet Davutoglu has resigned as Turkey’s Prime Minister. Reports suggest this comes as a result of a rift with President Erdogan caused by the increasingly ‘Presidential’ nature of Turkey’s politics.

Is Turkey part of Europe? For most of our civilisation’s history, to have even asked such a question would have been to invite derision. The Ottomans were kept out of Europe not by some early-onset prejudice, but by the armies of Europe having to beat back their repeated invasions. The question became slightly more plausible a century ago with the rise of Ataturk and the modern Turkish state (one of the only successful efforts to reconcile the Islamic religion with state power). For a brief period around the turn of the millennium, some serious people (including the British government) supported Turkey joining the EU.

But today, the question has become academic — first because Turkey’s liberal trajectory long ago halted and began rolling backwards. And secondly because the country is now coming into Europe anyway. Recep Tayyip Erdogan, the Turkish president, has persuaded the EU to grant visa-free travel to his 75 million countrymen inside Europe’s passport-free Schengen area. In so doing, he has made more progress than any of his predecessors. Using a combination of intimidation, threats and blackmail, he has succeeded in opening wide the doors of Europe.

Erdogan’s success matters, because it says much about the EU — and the idea that it exerts ‘soft power’. This was the theory in 1999 when the EU declared Turkey to be ‘a candidate State, destined to join the Union’ so long as it fulfilled the standard criteria for membership. Its state should have ‘achieved stability of institutions guaranteeing democracy, the rule of law, human rights, respect for and protection of minorities’. Four years later, the EU announced that Turkey had ‘taken important steps’ to ensure effective implementation, particularly in allowing Turkish citizens to ‘enjoy fundamental freedoms and human rights in line with European standards’.

For a brief moment, it all seemed to be going well. Formal accession negotiations began in 2005, but by then something important had happened to Turkey. That something was Recep Tayyip Erdogan. First elected with his ‘Justice and Development’ party (AKP) as prime minister in 2003, the man who is now president set about fundamentally altering Turkey’s direction of travel. He was not some proud moderniser. While mayor of Istanbul, he was imprisoned for inciting religious hatred by reciting these words at a rally:

“ The mosques are our barracks,

The domes our helmets,

The minarets our bayonets,

And the faithful our soldiers…

This was seen by Turkish judges as a threat to the secularist, Ataturkist -traditions of Turkish democracy. They were quite right. But Erdogan is a patient Islamist who famously compared democracy to a bus ride: when it gets him to where he wants to get to, he will get off. So as he continued his bus ride of elected office, he used his power to tighten his grip and consolidate power behind one party — and one man. He even commissioned a new golden throne to sit on. The putative caliph set about taking Turkey in an all too predictable direction — consolidating power around himself by taking it away from the military and judiciary and stifling domestic dissent whenever he could.

The extent to which Erdogan has been able to take Turkey backwards is a modern tragedy. When corruption allegations emerged around his immediate circle just over two years ago, he swiftly banned YouTube and Twitter, stuffed the ensuing investigatory -commission with members of his own party and dismissed the investigations as a ‘coup attempt’ by people serving ‘foreign powers’. Every time Erdogan and his circle are judged by the normal standards of the law, he responds with such hysterical counter-attacks. And all the time, it was asked: what about EU membership? Didn’t Erdogan worry that his authoritarianism would disqualify him outright?

But he gambled that the EU, for all of its pious words, could be bought off later. Now and again, Brussels tried to wag its finger at Turkey. For example, after one round of judicial meddling, the Council of Europe’s commissioner for human rights wrote that ‘Proposals to curb powers of High Council of Judges and Prosecutors represent a serious setback for the independence of the judiciary in Turkey.’ How Ankara must have quaked.

Erdogan’s upheaval of the judiciary and police continued regardless. In a single night in January 2014, he removed and replaced some 350 police officers. His party gave itself new powers permitting domestic espionage on banks and companies on matters relating to ‘foreign intelligence’. As one political opponent told Erdogan on the floor of parliament (for how long will that be possible?), ‘You want to purge democracy and control the entire system.’ Indeed so.

This has not gone unnoticed by the Turkish people. In 2013, protests against the government spread to 60 cities. But the police crushed them brutally, and laws were later passed to restrict future protests. Since then the government has acted to further crush press freedom and the country regularly tops world league tables for the number of imprisoned journalists. But even this was not enough for the EU to withdraw its offer of Turkish entry. Each year, it published reports listing Erdogan’s various transgressions. And Erdogan treated them first with indifference, then with contempt.

By the end of 2013, Erdogan said he’d take no more lectures from Brussels and that he ‘sincerely expected the EU, which sharply criticises its member countries, should criticise itself and write its own progress report’. In March he seized control of Zaman, until then Turkey’s highest--circulation newspaper. And he has taken action against thousands of citizens for the offence of insulting the president. Last month, a Turkish man was arrested for insulting Erdogan by asking police for directions to the zoo.

While the suppression of freedoms within Turkey is a tragedy, the extension of Erdogan’s repression inside the EU is a -scandal. When a late-night comedy show in Germany pointed to the absurdity of a German law forbidding insults against foreign leaders by attacking Erdogan, Turkey demanded that Berlin acted. Erdogan was calling Angela Merkel to heel. And successfully: she approved prosecution of the offending comedian, with the nod to her critics that the German courts could still find Mr Bohmermann innocent. Which (for now) is just about the only difference between Germany and Turkey.

As Erdogan has worked out, however much Turkey fails to live up to the EU’s expectations, the EU’s attitude to Turkey is ‘ever onwards’. Its 2013 ‘Visa Liberalisation Dialogue’ set out 72 conditions on security, migration, public order, fundamental rights and readmission of irregular migrants that Turkey needed to achieve. Despite failing them, in November last year the EU and Turkey agreed that visa-free travel should start this October. All the time Turkey demanded more and faster.

As well they could. Because last year — after the German Chancellor opened the borders of Europe to anyone who could get here — the tables turned. Persuaded that every problem in the Middle East, Far East, North and Sub-Saharan Africa was Europe’s fault and Europe’s responsibility, millions duly came. And will again. Today, even the European Commission and Frau Merkel realise that in order to avert political catastrophe in Europe, they must bring the number of entrants down. Suddenly, as Erdogan himself said, ‘The European Union needs Turkey more than Turkey needs the European Union.’

Turkey is home to 2.7 million Syrian refugees — a fact which Erdogan is treating like being in possession of a loaded gun. He threatens to send them over the Aegean to Greece, or let them walk through Bulgaria. ‘If the European Union does not take the necessary steps, then Turkey will not implement the agreement,’ he said last month. ‘Some three million people are being fed on our budget. But we are not doing this for thanks.’ Without visa liberalisation for Turks, ‘no one can expect Turkey to adhere to its commitments’, added Ahmet Davutoglu, the Prime Minister.

And so the EU has accepted Turkey’s abominable treatment of Kurds. It has ignored the ongoing illegal occupation of north Cyprus. And it has ignored every single one of its own putative ‘criteria’. In trying to avoid millions more migrants, the EU has opened the doors to 75 million Turks. It’s quite possible that Ergodan doesn’t even want EU membership, that he just enjoys lording it over Europe and showing Turks how he can make a continent (or at least its leaders) quiver. Now Europe is behaving like a man so fearful of death that he chooses to commit suicide.

And what of Britain’s role in all this? Shortly after becoming Prime Minister in 2010, David Cameron went to Ankara and announced that he would do everything he could to ensure Turkey entered the EU. Speaking as a guest of Erdogan, Cameron announced: ‘Turkey deserves its place at the top table of European politics — and that is what I will fight for. I will remain your strongest possible advocate for EU membership and for greater influence.’

Our Prime Minister has been true to his word. Even while Erdogan’s government has done everything it could to demonstrate why it has no place in the EU, Cameron has insisted on extending the borders of Europe to Syria and Iraq. Only a few months ago in the Commons, he reconfirmed his government’s commitment to Turkish entry. Of course, now that the referendum is upon him, he says that it doesn’t matter what he thinks because the French will not allow Turkey to join. This puts the British Prime Minister in the strange position of citing the French government as the only force capable of saving him from his own views.

In private, Erdogan must be amazed at just how much he can wrangle. The worse his behaviour, the greater his clout in Europe. He can send German police to arrest German comedians whose jokes he dislikes. He can instruct the EU to delay its ‘progress reports’ on Turkey to a time that better suits his electoral purposes. A few weeks ago, a leaked transcript of a conversation showed Jean-Claude Juncker, president of the European Commission, pleading Erdogan to consider that ‘we have treated you like a prince in Brussels’.

Erdogan, prince of Europe: quite a title to confer upon a wretched Islamist bully who regards refugees as human bargaining chips and stands poised to destroy our continent. Nevertheless he is someone who has at least established — and shown the world — just how the EU works.

Update: Since this article was published Ahmet Davutoglu has resigned as Turkey's Prime Minister. Reports suggest this comes as a result of a rift with President Erdogan caused by the increasingly 'Presidential' nature of Turkey's politics.