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.
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.
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.