A court in Turkey has given life sentences to 337 military officers and others, in one of the biggest trials linked to the 2016 coup attempt.
Mr Erdogan says US-based Muslim cleric Fethullah Gulen masterminded the plot, which led to mass arrests.
Mr Gulen has denied any involvement in the attempted coup in July 2016 that killed 251 people and injured more than 2,000. Mr Erdogan was on vacation at the time at a resort.
Thousands of civilians rallied in support of Mr Erdogan in a night of turmoil, confronting rogue soldiers and preventing the plotters from seizing power.
The trial began in August 2017, and the charges included seeking to kill President Erdogan and seize key state institutions. Turkey’s biggest court – in Sincan near Ankara – was packed for the verdicts. Officers who conspired against Mr Erdogan seized aircraft at the Akinci base, taking then chief of staff Gen Hulusi Akar and some other officers hostage.
Former air force commander Akin Ozturk was jailed for life last year for his role in the plot.
The indictment states that 25 pilots in F-16s bombed targets in Ankara, including parliament, which was hit three times, as well as key security buildings. The bombing killed 68 people in Ankara and injured more than 200. Twenty-five of those in the dock were generals and 10 were civilians.
More than 10 of the military officers – including F-16 fighter pilots – and four civilians got 79 “aggravated” life sentences each. The “aggravated” sentence requires harsher prison terms than for a normal life sentence.
Six were put on trial in absentia, including Mr Gulen and Adil Oksuz, a theology lecturer accused of being a key co-ordinator in the coup plot.
Among those receiving “aggravated” life terms was businessman Kemal Batmaz, accused of assisting Adil Oksuz.
The Hizmet movement led by Mr Gulen has been branded a “terrorist” organisation by Mr Erdogan. He was once an ally of the president, but since the coup attempt the 79-year-old cleric has remained a fugitive in Pennsylvania and Turkey wants his extradition. Mr Erdogan carried out a sweeping purge of state institutions after the plot, sacking or suspending more than 100,000 public sector employees, including teachers and judges, who were accused of links to Mr Gulen.
There have been many trials of alleged plotters and courts have issued more than 2,500 life sentences.