Europe's top human rights court has ordered Turkey to immediately release Kurdish politician Selahattin Demirtaş from prison after more than four years of detention.
The European Court of Human Rights said his arrest in 2016 violated his freedom of expression and his right to participate in free elections.
Its ruling partly upholds the court's call for his release two years ago.
His detention during the 2018 presidential election, in which Demirtaş was a candidate, "pursued the ulterior purpose of stifling pluralism and limiting freedom of political debate, which was at the very core of the concept of a democratic society", the court said.
Turkey was fined €60,400 in damages, costs and expenses, and ordered to "secure the applicant's immediate release".
Demirtaş is an opponent of Turkish president Recep Tayyip Erdoğan and a former co-leader of the Peoples' Democracy Party (HDP), Turkey's largest pro-Kurdish party.
He has been held in prison mostly in pre-trial detention since November 4, 2016, when he was arrested alongside 11 other HDP members.
He initially faced charges connected to a protest held near Turkey's Syrian border over the army's failure to intervene in an attack by the Islamic State group against the Syrian-Kurdish border town of Kobani.
The arrests occurred shortly after Demirtaş, a sitting member of the Turkish parliament, was stripped of his immunity from prosecution.
He later stood as a candidate in the 2018 presidential election and ran his campaign from his prison cell.
His ongoing detention has been controversial in Turkey, with members of the governing AK Party among those calling for his detention to be ended.
In November, former deputy prime minister Bülent Arınç speculated he could be released soon.
But he was forcefully rejected by Erdoğan, who called Demirtaş a "terrorist" with "blood on his hands".
Tuesday's ruling came from the Grand Chamber, the court's highest body, meaning its judgment is final and binding.
It is the result of separate appeals by Demirtaş and the Turkish government against an earlier judgment two years ago.
The court said in November 2018 that Turkey had violated Demirtaş's human rights on three counts: to be promptly brought before a judge, to sit in parliament as an elected MP, and to stand in free elections.