Turkish President Recep Tayyip Erdogan wipes his tears during the funeral of protestors Mustafa Cambaz, Erol and Abdullah Olcak. Photo / AP
With the world in a state of anarchy, Turkey's botched military coup on Friday felt like yet another blow in a series of catastrophic events.
There had been some warning signs that all was not well in the Middle Eastern country, with think tanks suggesting just months ago that there could be military pushback as tensions rose.
But no one was ready for an uprising of such scale and violence.
At the centre of this is President Recep Tayyip Erdogan, a man who commands such respect in his nation that he was able to persuade citizens to head out to the streets to fight back against the army.
Since successfully defeating the coup, the country's leader has arrested 6000 people and suggested he may bring back the death penalty, making it clear he will continue to reassert his dominance. He was even accused of faking the uprising to allow him to crush his enemies.
Whether or not that rumour is true, his 15-year rule has been dogged with controversy, and he is now using this opportunity to silence his opponents for good.
This is the story of Erdogan's chequered reign.
Turkey's decline Five years ago, Turkey was considered a beacon of hope in the troubled Middle East, valiantly building a prosperous and peaceful future amid the chaos of the region.
"It used to be a political and economic exemplar," Middle East security expert Rodger Shanahan, a Research Fellow at the Lowy Institute, told news.com.au. "Secular and economically successful. Those days are long gone."
Associate Professor Shanahan lays the blame for this with Erdogan. "He's degraded the regional currency of Turkey."
The country has recently been battling an escalation in the civil conflict with Kurdish separatist rebels, bombings by suspected Islamic extremists - including an attack on Istanbul's main airport last month that killed dozens - and concern over the war in neighbouring Syria that has pushed huge numbers of refugees across the border.
Turkey was once considered a model of stability and democracy, and has been on the brink of joining the European Union.
A military statement said the coup was launched because of "rising autocratic rule", a system in which power is concentrated in the hands of one person without legal or popular constraint.
Is Erdogan anti-democracy? Critics have called Erdogan's rule increasingly authoritarian, with the president cracking down on dissidents and the media, as well as shaking up the government.
Since Friday (local time), almost 3000 soldiers have been detained, along with three of the country top generals, and 2700 judges and prosecutors have been fired.
The leading conspirators will stand trial for trying to overthrow the government, but not all of the thousands punished were direct participants.
"The speed at which they were rounded up is indicative of some pre-existing list," said Assoc Prof Shanahan. "He's using this as a way of targeting his political opponents. It's about the aggregation of power and centralisation of authority."
In April, the head of Germany's Pirate Party slammed his government for "dealing with dictators" after he was arrested for reciting an insulting poem about Turkish president. British magazine The Spectator then launched an "Insult Erdogan Poetry Contest", with journalist Douglas Murray writing: "Nobody should be surprised that Turkey's president Recep Tayyip Erdogan has instituted effective blasphemy laws to defend himself from criticism in Turkey.
"But many of us had assumed that these lese-majeste laws (an offence against the dignity of a reigning sovereign or state) would not yet be put in place inside Europe. At least not until David Cameron succeeds in his long-held ambition to bring Turkey fully into the EU. Yet here we are. Erdogan's rule now already extends to Europe."
'The situation is of his own making'
The botched coup, which saw warplanes fly over key government installations and tanks roll up in major cities, ended hours later when loyal government forces including military and police regained control of the military and civilians took to the streets in support of Erdogan.
At least 265 people were killed and 1440 were wounded after explosions and gunfire erupted in Ankara, Istanbul. Government officials say at least 104 conspirators were killed.
The president reacted with force.
"What is being perpetrated is a treason and a rebellion," he said. "They will pay a heavy price for this act of treason."
He accused exiled Muslim cleric Fethullah Gulen of being behind the coup, demanding the United States extradite him. But Gulen denied any involvement, saying it was "possible" the coup was staged by Mr Erdogan.
The president has been described as "the coup's only winner", but we are not looking at a man in control.
He certainly wouldn't have chosen so many challenges for his country, from terrorists to refugees to Kurdish rebels. "The situation in Turkey is of his own making," said Assoc Prof Shanahan. "He's not exploited it, he's living with the consequences."
Mr Erdogan's poor record on foreign policy has led to many of the disasters Turkey faces today.
He believed the Syrian conflict would end quickly, for example, paying little attention to who entered the war zone from Turkey and forming no Plan B when Bashar al-Assad's reign continued.
He also created problems for himself over a 2010 flotilla to the Gaza strip, last month signing an accord with Israel and slamming the group who launched the fleet, in a move critics said made him complicit in the occupation.
Talks over joining Europe have stalled, with neighbouring countries harbouring serious ill-will towards Erdogan.
The people's president Erdogan has imprisoned journalists, fought to stamp out "conspiracies" and fired police chiefs, with the army apparently acting in an effort to preserve democracy.
He is all about power, having served as prime minister for the maximum four terms before becoming president and transforming the role from figurehead to one of deep influence, something Vladimir Putin also did.
Yet despite all this, Erdogan is popular in his own country, winning repeated elections and this weekend persuading his countrymen to whip and beat rebellious soldiers in the street.
Supporters gathered in squares and at airports over the weekend to show their support. He acknowledged "my people" fought against the coup attempt and took the tanks back, addressing thousands of flag-waving supporters outside Istanbul's Ataturk Airport on Saturday morning. "They have pointed the people's guns against the people," he said.
"The president, whom 52 per cent of the people brought to power, is in charge.
"They won't succeed as long as we stand against them by risking everything."
However, a response by thousands is a relatively low turnout when 14 million live in Istanbul - and the military's effort appeared weak.
Turkey is a vital partner in US-led efforts to defeat Islamic State, allowing American jets to use its Incirlik air base for missions into nearby Syria and Iraq.
On Saturday, it halted these operations following the coup attempt, and the base commander was arrested for complicity in the uprising.
These developments will make the US very nervous, as it is reliant on the country's co-operation, with President Barack Obama already urging all sides to support the democratically elected government.
Assoc Prof Shanahan said Erdogan was "a canny politician" within his own country.