Europe’s top human rights court ruled on Tuesday that the right to liberty and freedom of expression of Turkish journalist and author Ahmet Altan had been violated due to his detention and imprisonment on charges related to a 2016 coup attempt.

Altan, 71, has been in prison since September 2016, when he was detained over allegations that he disseminated subliminal messages related to the coup attempt during a TV programme, as well as articles he had written criticising the government.

He was sentenced to life in jail in 2018 without parole for attempting to overthrow the constitutional order but the ruling was later overturned by the top appeals court.

Altan was then re-tried and sentenced to more than 10 years for aiding a terrorist organisation. He was briefly released due to time served but re-arrested a day later after the prosecutor objected. The top appeals court is still reviewing the case.

The European Court of Human Rights ruled that Altan’s right to liberty and security had been violated since he was accused without reasonable suspicion.

“The Court found that the applicant’s criticisms of the President’s political approach could not be seen as an indication that he had prior knowledge of the attempted coup,” the court said.

“Therefore the logic applied in the present case by the authorities – equating those activities to the offences with which the applicant had been charged – could not be regarded as an acceptable assessment of the facts,” it said.

The court said Altan’s freedom of expression was violated because his detention could not be justified by law. But it ruled it could not be established beyond doubt that Altan’s detention had served an ulterior purpose.

Veysel Ok, one of the lawyers who applied to the ECHR, said it was obvious that Altan’s detention was political and that the court should have found a violation in that regard.

“Ahmet Altan was arrested because he was targeted by the political power and media close to the government. The court ruled that his detention was not political. The ruling is lacking in this regard,” he told Reuters.

While ECHR decisions are binding, Turkey has ignored several recent rulings, including calls to release philanthropist Osman Kavala and pro-Kurdish politician Selahattin Demirtas.