Erdogan's revenge: Turkey since failed 2016 coup
On a balmy night on July 15, 2016, a rogue faction in the military tried to take over the country, using warplanes and tanks to attack government buildings.
Some 250 people - in addition to at least 24 plotters - died and more than 2,000 were injured in the ensuing chaos as Erdogan rallied his supporters out on the street.
Since then, the fateful night's impact has been felt in almost every aspect of Turkish life, including education, the judiciary and the leadership.
The crackdown on alleged coup-plotters, activists, human rights defenders and political opponents has helped Erdogan further cement the control he has amassed over Turkey since rising to power in 2003.
But it has also complicated his relations with traditional Western allies and put a dampener on the foreign investor climate because of concerns about the rule of law.
Less than a year after the coup attempt, Erdogan held a referendum to transform Turkey's parliamentary democracy into an executive presidency.
He narrowly won and has immense power in his hands, often announcing major decisions in overnight decrees.
"Erdogan has used the coup attempt to consolidate his grip on power," veteran Turkey analyst Gareth Jenkins said.
'Downsides' of power
July 15 is now a public holiday, with Erdogan calling on supporters to come out in numbers at a commemoration event in Ankara on Thursday.
Yet this centralisation of power has a political drawback when things go wrong, analysts warn, as they did across the world during the coronavirus pandemic.
"Having this much power also has its downsides: when things go wrong, like the current economic situation, it is harder to deflect the blame," a Western diplomat told AFP.
Turkey suffers from persistently high inflation and the lira has lost two-thirds of its value against the US dollar since the week of the attempted putsch.
Turkey claims US-based preacher Fethullah Gulen plotted the coup using members of his network in the military.
Gulen denies the charges and insists his Islamic Hizmet movement promotes peace and education.
Washington's refusal to extradite Gulen has been a constant irritant on relations between the NATO allies.
Massive legal process
The post-coup crackdown has also decimated the Turkish military's ranks.
Defence Minister Hulusi Akar on Tuesday said Turkey has dismissed 23,364 military personnel in the fight against Gulen's network.
More than 321,000 people have been detained in all since 2016, Interior Minister Suleyman Soylu said.
Most have been released, but the scale of the detentions has had a chilling effect on Turkish politics.
Nearly 4,000 judges and prosecutors have been sacked, among more than 100,000 public sector workers fired or suspended over alleged Gulen links.
The courts have handed down life sentences to 3,000 people, according to state news agency Anadolu, while 4,890 defendants have been convicted over links to the coup bid.
But on Wednesday, Erdogan showed no sign of slowing down.
"We will follow (his movement) until its last member is neutralised," he said.
Some observers believe Erdogan is now using his ability to survive a coup as the foundation for his legacy.
Turkey's current borders were born from the war of independence fought between 1919 and 1923, and led by the founder of the secular republic, Mustafa Kemal Ataturk.
Erdogan leads an Islamic-rooted party and often refers to the "New Turkey" he is building as part of his own legacy.
"The coup does give the foundation for this myth of a New Turkey," Jenkins told AFP.
"This allows him to portray himself as the protector of the state and the leading figure in his country's modern history, and thus shape his legacy," the Western diplomat said.