A year ago, a faction in the Turkish army staged a failed coup bid against President Recep Tayyip Erdogan, prompting a widespread crackdown on his opponents.
The country was shaken and 249 people died in the botched putsch, which Erdogan blamed on Muslim preacher Fethullah Gulen, who lives in the United States.
Following are key moments beginning with the attempt to overthrow the Turkish president.
On July 15, 2016, a renegade army faction launches a failed coup against Erdogan which leaves 249 people dead, not including the plotters. Erdogan blames the putsch on Gulen, a former ally turned arch-foe.
Erdogan is on vacation in Marmaris, western Turkey, and urges the population to resist, which many do while he rushes to Istanbul.
Since then some 50,000 people have been arrested and over 100,000 fired or suspended from their jobs. The government imposes control over the army, whose political influence ebbs.
Erdogan demands that the US extradite Gulen.
On July 16-17, hundreds of generals, judges and prosecutors are arrested across Turkey on allegations they participated in the failed coup. The purges widen to include the police, the education system and the media.
On July 20, Erdogan proclaims a state of emergency and says other countries might be involved in the coup, while warning that it might not be finished.
The purges extend to pro-Kurdish movements and critical journalists.
Erdogan meets Russian President Vladimir Putin in August to cement relations with one of the main backers of President Bashar Al-Assad's regime in Syria. The meeting also helps restore trust after Turkey shot down a Russian jet over the Syrian-Turkish border in late 2015.
Two weeks later, Turkey launches a major military operation in northern Syria, driving Islamic State group fighters from several cities.
Another key target for Turkey is Kurdish militia groups which Ankara considers allies of the separatist Kurdistan Workers' Party (PKK).
In March 2017, several European countries cancel rallies by Turkish ministers and bar its politicians from visiting in order to campaign for a referendum on expanding Erdogan's powers.
A vitriolic war of words ensues, with Erdogan repeatedly accusing Germany and the Netherlands in particular of behaving like "Nazis".
Relations with Germany have continued to deteriorate since then.
Turkish voters narrowly approve in an April 16 referendum constitutional changes that will expand Erdogan's powers, and possibly enable him to stay in office until 2029.
The opposition questions the legitimacy of the vote, with the secular Republican People's Party (CHP) and the pro-Kurdish Peoples' Democratic Party (HDP) vowing to challenge the outcome.
The new presidential system would come into force after presidential and parliamentary elections in November 2019.
International observers from the OSCE and the Council of Europe say the poll did not meet European Union standards and call on Turkey to investigate presumed irregularities.
On June 15, thousands of people respond to a call by CHP leader Kemal Kilicdaroglu for a "walk for justice" from Ankara to Istanbul after one of the party's lawmakers, Enis Berberoglu, was sentenced to 25 years in jail on charges he leaked classified information to a newspaper.
Kilicdaroglu accuses Erdogan of being the "July 20 coup plotter", a reference to the declaration of a state of emergency that led to the government's crackdown.