Older Turks who witnessed the awful scenes that unfolded during the attempted coup d’etat in the country last year would have known what to expect had it succeeded: the suspension of the legal order, a climate of fear, mass arrests, torture. After all, it had happened before, most recently in 1980.
This time round, however, the coup failed, but Turkey has ended up getting those things anyway.
A year on, it remains under a state of emergency as president Recep Tayyip Erdogan’s government has embarked on one of the most far-reaching purges in the country’s modern history.
Just as the 1980 coup brought about profound and lasting changes to Turkish society and politics, so the legacy of the July 15 coup attempt is reshaping the country in ways that are likely to be felt for decades to come.
The stream of detentions, police raids, and expropriations is dizzying. In the past two weeks alone, the heads of several of Turkey's top human rights organisation were held as they met for a workshop, and arrest orders were issued for 72 academics including several from Istanbul's prestigious Bogazici University.
They join tens of thousands of others already behind bars. In total, some 180,000 people have been dismissed from the public sector, with many barred from leaving the country. The media has been decimated, with some 170 websites, newspapers, magazines and news channels shut down.
The purge is ostensibly aimed at the network of US-based imam Fethullah Gulen, who has been blamed for the coup attempt.
However it has gone much further than that, targeting leftists, Kurdish nationalists, and liberals — almost anyone who publicly defies the Erdogan government.
In April — amid this climate of repression — a series of constitutional amendments passed by referendum stripped parliament of many of its powers, concentrating them in Mr Erdogan’s hands, and granting him effective control over judicial appointments.
'Walk for Justice'
The extraordinary sense of crisis engendered by the coup attempt has also allowed him to press on with the creation of what he calls the "New Turkey", in which conservative Islamic values lie at the heart of the nation.
The depth of resistance to all this was evident on Sunday, when the leader of the country's long-moribund main opposition party staged a rally in Istanbul that attracted hundreds of thousands of people, and which came at the end of a 425km "Walk for Justice".
“We walked for non-existent justice. We walked for the rights of victims, jailed lawmakers and journalists,” People’s Republican Party (CHP) leader Kemal Kilicdaroglu told the crowd, denouncing what he called the “July 20th civil coup” — the date on which the state of emergency began.
While allowing the march and rally to go ahead, Mr Erdogan sought to smear its participants as terrorist sympathisers, threatening the CHP by saying it had “gone beyond being a political opposition and taken on a different proportion”.
The accusation is a familiar one in today’s Turkey, where the government justifies its continuing clampdown by appealing to a deep-seated fear in the popular psyche of internal and external enemies plotting to divide, weaken and destroy the nation.
To his large and passionate base of supporters, Mr Erdogan symbolises the nation.
But many of his opponents have tried to keep him and the Islamist movement he represents from power, dating back to 1998 when he was removed as mayor of Istanbul, banned from public office, and imprisoned for four months by the country’s secularist establishment.
There were murmurings of a possible coup d’etat almost as soon as the AKP won power in 2002, and the party narrowly avoided closure by the judiciary in 2007.
More recently, it is his erstwhile allies the Gulenists — a shadowy, highly-organised religious movement that was infiltrating Turkey’s state organs at the same time that Mr Erdogan was building his political career — that have emerged as his primary antagonists.
Both shared the aim of bringing down the Kemalist establishment which saw itself as the defender of the legacy of Turkey’s modern founder Mustafa Kemal Ataturk. Having achieved this, they turned to fighting over the spoils.
Turkey’s descent into authoritarianism could be seen as essentially reactive: as the perceived threats facing Mr Erdogan have increased, so have the lengths to which he is willing to go to counter them.
Most shocking is the vindictiveness and arbitrariness of the current purges, with tweets making fun of the government, or possession of an account with a Gulenist-run bank being considered sufficient grounds for arrest.
Suspects have been blacklisted from public employment; many have had their assets seized, and not only themselves but often their family members have been banned from leaving the country. In recent weeks, one woman was detained in hospital with her newborn baby. Another was held while going into labour.
But beyond the repression is a broader plan to reshape Turkey, which the coup has lent decisive momentum. The country’s Islamists have long dreamed of reforming the system imposed by Ataturk after the First World War, and which they regarded as a betrayal of the heritage of the defunct Ottoman Empire.
Now, the foiled coup is providing a narrative to anchor that effort. In speeches and official propaganda, the successful resistance to the coup is being likened to the Turkish victory against the British at Gallipoli in 1915 or its 1919-1922 independence war with Greece as a pivotal moment in the nation’s destiny.
At the start of the most recent school year, children across the country were given classes on the meaning of the coup attempt, casting it’s defeat as a turning point for Turkey’s democracy and national sovereignty.
However it is a narrative that also seeks to emphasise the threats to Turkey, and justify further authoritarian, with Mr Erdogan claiming that only a strong executive without checks and balances can withstand the country’s enemies.
US, Europe ties tested
Another legacy of the coup is the fracturing it has caused in Ankara’s alliance with the West. With Mr Gulen himself based in the US, a deep conviction runs throughout Turkish society that Washington was somehow complicit in the coup attempt, an accusation repeatedly made by senior Turkish officials.
After the election of President Donald Trump last year, Mr Erdogan’s government has made efforts to repair its ties with the Americans. However, for the moment they are papering a series of differences on which there is little sign of reconciliation, most notably Washington’s continued military support for Kurdish Syrian rebels linked to terrorist-designated separatists in Turkey.
Meanwhile a gulf is growing between Ankara and Europe, with which Turkey has a long and mutual history of stirring antagonism in order to pander to nationalist sentiments at home.
Turkish ministers have been blocked from holding public meetings in several European countries with large Turkish diasporas, with European leaders accusing them of inciting hatred, and Mr Erdogan accusing the Dutch, Germans, and Austrians of "Nazism".
Last week the European Parliament called for Turkey’s accession talks, opened in 2005 but long stalled, to be suspended if the government fully implements the constitutional reform package passed in April.
Other than staunch ally Qatar, with whom Mr Erdogan has sided unerringly in the current diplomatic crisis in the Gulf, Turkey appears isolated in its region and at odds with the major powers to which it might look to build better ties as an alternative to its western orientation.
It is in conflict with Iran and Russia over its opposition to the Assad regime in Syria, and with Saudi Arabia and Egypt over its support of the Muslim Brotherhood. It is embroiled in a bloody Kurdish insurgency both on its own soil as well as in Syria and Iraq.
This tableau may suggest that Mr Erdogan’s post-coup vision of Turkey is headed for disaster. Yet he remains one of the most adept and charismatic political leaders in the world today. Crucially, he is still capable of pragmatism, as he demonstrated in his tolerance of Kilicdaroglu’s Walk for Justice.
Focus on economy
Perhaps more crucially, with the referendum over, the government has turned its energy towards improving an economy buffeted by crises. To the relief of the markets, senior government officials have cut their rhetoric against an "interest rate lobby", a supposed international finance conspiracy aimed at weakening Turkey by keeping rates high.
While analysts are increasingly wary of official economic data coming out of Turkey, the lira has stabilised after hitting a record low earlier this year and first quarter economic growth for 2017 was at five per cent.
If Mr Erdogan’s team can deliver economic stability, then it is hard to see how even the hundreds of thousands who rallied in defiance of him last weekend could derail his vision for Turkey.