ANKARA (Reuters) - Seventy four people, including soldiers, were sentenced to life in prison by a Turkish court on Wednesday for their role in an attempted coup, the state-owned Anadolu news agency said.

More than 240 people, most of them unarmed civilians, were killed on the night of July 15, 2016, when a group of rogue soldiers commandeered tanks and warplanes in a botched attempt to overthrow President Tayyip Erdogan.

Turkey blames U.S.-based Muslim cleric Fethullah Gulen for the abortive putsch and has carried out a widespread crackdown on his suspected supporters, detaining some 160,000 people, including academics, soldiers and civil servants.

Of those, 77,000 have been formally charged and kept in jail during trial, according to the interior minister.

On Wednesday, the court sentenced the 74 defendants to aggregated life sentences for “attempting to disrupt the constitutional order”, Anadolu said.

Aggravated life sentences are subject to a harsher regime in prison, and are not eligible for parole or general amnesty.

It was not immediately clear how many soldiers were among the group sentenced.

Rights groups and Turkey’s Western allies have voiced concern about the scope of the purges, saying Erdogan had used the coup as a pretext to quash dissent.

The government, however, says the measures are necessary due to the gravity of the threats it is facing.