The European Court of Human Rights ruled on Wednesday that Turkey should immediately release prominent Kurdish politician Selahattin Demirtas, and said the justification for his years in prison was cover for limiting pluralism and debate.
The Grand Chamber of the ECHR said Demirtas - who is charged with terrorism-related offences - had had his freedom of expression, liberty and other rights violated. His pre-trial detention sent "a dangerous message to the entire population" that sharply narrowed free democratic debate, it said.
"The Court thus concluded that the reasons put forward by the authorities for the applicant's pre-trial detention had merely been cover for an ulterior political purpose, which was a matter of indisputable gravity for democracy," the Chamber said.
Demirtas has been jailed since November 2016. He faces 142 years in jail if convicted in the main trial against him in which he is accused of being the leader of a terrorist organisation over his actions during protests in 2014.
In that year the protests in Turkey's mainly Kurdish southeast accused the army of standing by as Islamic State militants besieged the Syrian Kurdish town Kobani, just across the Syrian border. The protests turned violent and led to the deaths of 37 people.
Demirtas chaired the mainly Kurdish Peoples' Democratic Party (HDP) between 2014 and 2018. The ECHR said it did not see evidence in decisions for his detention that linked his actions and the alleged offences.
In 2018, a chamber of the ECHR ruled that his right to a speedy trial had been violated given his lengthy detention without a final conviction.
President Tayyip Erdogan responded at the time by saying Turkey would make its counter-move against the ruling. Shortly after, an appeals court approved a jail sentence against Demirtas on charges of disseminating terrorist propaganda for a speech he made in 2013, thereby finalising his conviction.
Erdogan's recent pledges of legal reform had led to some speculation that Demirtas may be released. But Erdogan rejected that idea last month, calling Demirtas a terrorist and saying he has the "blood of thousands of Kurds on his hands".
The opposition has accused Erdogan and his ruling AK Party of seeking to quash dissent by bending the judiciary and jailing opposition members and critics since a 2016 failed coup. The government has said its actions are justified by threats facing the country and that courts make decisions independently.