A Turkish court has sentenced six journalists and media employees accused of involvement in a failed coup attempt in 2016 to life prison terms, the country’s state-run news agency reported.

Anadolu Agency said the court in Silivri, on the outskirts of Istanbul, convicted prominent journalists Ahmet Altan, Mehmet Altan and Nazli Ilicak and three other media sector employees of crimes against the state. One defendant was acquitted.

They are the first journalists convicted over the coup attempt on July 15 2016, which Turkey says was orchestrated by a network led by US-based Muslim cleric Fethullah Gulen. He denies involvement.

Their conviction came as another court in the same courthouse ordered German journalist Deniz Yucel — detained in Turkey for a year — released from jail pending trial.

The defendants were charged with attempts against Turkey’s constitution and membership of a terror organisation.

The group were employed by Gulen-linked media organisations but have rejected the charges, denying any involvement in the coup attempt.

Mehmet Altan’s lawyer, Ergin Cinmen, said: “Of course we are going to appeal the verdict. It’s a decision of the century and will need to be taught in law faculties.

“It’s a decision where freedoms of expression and thought have been destroyed.”

More than 38,000 people, including journalists, are in jail as part of an ongoing large-scale government crackdown launched on Mr Gulen’s network of followers after the attempted coup.

More than 110,000 have been sacked from government jobs.

Ahmet Altan, a former newspaper chief editor, and his brother, Mehmet Altan — a columnist and academic — were accused of appearing together with veteran journalist Mr Ilicak in a political debate show on a Gulen-linked television channel.

Prosecutors deemed that their comments indicated they had prior knowledge of the coup attempt.

In January, Turkey’s Constitutional Court ruled that Mehmet Altan and Sahin Alpay — another journalist being tried separately — should be released pending the outcome of their trials, but a lower court refused to implement the decision, raising concerns about rule of law in the country.