ANKARA (Reuters) - A Turkish court sentenced a judge who previously won an award for human rights to 10 years in prison over links to the network Ankara says orchestrated an attempted coup in 2016, the state-owned Anadolu news agency said on Friday.

Murat Arslan, who has been detained for 22 months, was convicted of membership in an armed terrorist organization, after prosecutors charged him with use of the encrypted messaging app ByLock, Anadolu said.

Arslan has denied the charges and said any evidence that he had used the app was “fabricated”, Anadolu said.

The government says the outlawed app was widely used by followers of the U.S.-based cleric Fethullah Gulen, whom it blames for the attempted coup that saw rogue soldiers commandeer tanks and aircraft, attacking parliament and killing some 250 unarmed civilians.

Gulen, a former ally of President Tayyip Erdogan who has lived in self-imposed exile in the United States since 1999, has condemned the coup and denied any involvement with it.

The Council of Europe human rights body in 2017 gave Arslan, who was detained at the time, the Vaclav Havel Human Rights Prize, a decision that prompted Turkey to say it would cut back its funding to the body.

Arslan was the former head of Turkey’s Judges and Prosecutors Union, a civil legal association that was shut down by government decree in the wide crackdown that followed the coup attempt.

Since the failed coup, authorities have formally arrested some 77,000 people and sacked or suspended more than 150,000 soldiers, civil servants and more over alleged links to the coup attempt, including alleged users of ByLock.

Rights groups and Turkey’s Western allies have voiced concern over the scale of the crackdown, saying President Tayyip Erdogan was using the putsch as a pretext to quash dissent.

The government, however, says the security measures are necessary due to the gravity of the threat it faces from Gulen’s network.