For most of the past century the story of Turkey has been one of looking to see where it fits it in the world. After the collapse of the Ottoman Empire which stretched from south-eastern Europe to Iraq, Ataturk decreed in the 1920s that the new republic should isolate itself from the turbulence of its former imperial possessions in the Middle East.
This turned out to mean membership of the Nato alliance, close relations between the Turkish military and Washington, and the ambition to join the European Union.
For a country that was overwhelmingly Muslim, this was a brutal dislocation from the Islamic world. Still, Ataturk had single-handedly beaten off the greedy European powers to create the Turkish Republic, so the military had enough prestige to dominate the state for a generation or two.
It is this dislocation, keenly felt in the Turkish heartland outside the major cities, which spurred the rise of the Justice and Development Party (known as the AKP) of Recep Tayyip Erdogan, who has overseen Turkey’s dramatic reconnection with its Islamic heritage. At the start of his political career, Mr Erdogan cast himself as an Islamic democrat, an attractive label in Europe with some similarity to the Christian Democrat politicians in Germany and Italy who formed the nucleus of European integration.
The referendum held last Sunday, which created a powerful executive presidency for Mr Erdogan, by a slim majority of 51.4 per cent to 48.6 per cent, marks the start of a new stage in Turkey’s story. While reaction from European states has generally been muted, the official verdict of the election monitors is that it took place on an “unlevel playing field” tilted in favour of Mr Erdogan. If the margin of victory had been greater, these concerns might have been fewer, but in the eyes of some Europeans, Turkey’s brand of democracy is not up to the expectations of the European Union.
For Mr Erdogan, the subject is closed, though he has to deal with the consequences of a vote that reveals a nation sharply divided. In his view, a win is a win, as evidenced by the 52-48 result of the British vote to leave the EU, and Turkey is facing huge challenges from the Syrian war, a huge influx of refugees, the renewed Kurdish insurgency and economic uncertainty. No one doubts the scale of the challenge; the issue is whether the political background – a state of emergency following last year’s attempted coup – was appropriate for holding a constitutional referendum.
Ultimately, these concerns may be quietly buried. Turkey first applied to join the EU 30 years ago, but membership is not a political possibility for the Europeans, even though the process is still officially in train.
Of more immediate concern to European countries is the status of the agreement on migrants worked out last year with the German chancellor, Angela Merkel. Turkey agreed to act as gatekeeper to Europe and stop migrants moving westward in return for $6 billion in funding and a promise of visa-free travel in the EU. Visa-free entry is a difficult concession for European politicians to swallow, given the rising levels of anti-foreigner sentiment in Europe. But the prospect of a new migrant surge is also worrying, with elections due in France and Germany.
It looks like Mr Erdogan has the upper hand. He could, if he wanted to, sever the link with the EU on the grounds that Europe is never going to welcome Turkey as a member. But economics suggest caution: 44 per cent of Turkish exports go to the EU, and this is not a market that any Turkish leader could wilfully neglect.
A clue as to how the West will treat Turkey comes from Washington. While European countries were drafting diplomatic messages urging Mr Erdogan not to ignore that 48.6 per cent who voted No, the White House announced that Donald Trump had called Mr Erdogan to congratulate him on his victory. While some in the United States have called this a betrayal of American values of democracy and freedom, others have seen it as a clear sign of the meaning of “America First” in foreign policy.
Turkey is a valued US ally, and particularly needed in resolving the Syria crisis, yet relations have become strained by the US military’s choice of the Kurdish-led militia, the Syrian Democratic Forces, to spearhead the conquest of the ISIL stronghold of Raqqa.
Turkey sees the SDF as allies of the banned Kurdistan Workers Party (PKK) and therefore a threat to the survival of the state.
In these circumstances, it is in America’s interest to cosy up to Mr Erdogan to make a new start. Of course, Washington has always tempered its proclaimed idealism with realpolitik. But there is no doubt that under Barack Obama the congratulations would have been mixed with expressions of concern about democracy and human rights.
Here one can see the hand of the generals Mr Trump has brought in to his administration, who all have long experience of Nato politics. But there is also a deeper change. The spread of the so-called universal values of liberty and equality around the world after the end of the Cold War has stalled and may be going into reverse.
The strongman model of government, where elections are manipulated by the leader with the consent of much of the population, has been perfected by Vladimir Putin in Russia.
Mr Erdogan also believes that the people are reassured by a strongman at the top, and echoes can be seen in Xi Jinping, who follows a succession of colourless Chinese leaders, and the Indian prime minister, Narendra Modi, who has the image of a strongman even if Indian democracy remains vibrant.
Mr Trump has not hidden his admiration for Mr Putin and aspires to be a strong leader too. How the West responds to Mr Erdogan’s new powers will be closely watched around the world.
Alan Philps is a commentator on global affairs
On Twitter @aphilps