In today’s judgment, the Istanbul Regional Court of Justice upheld the verdict of a lower court, which found Demirtas and his colleague Sirri Sureyya Onder guilty of “making propaganda for an armed terrorist organization” through speeches they made at a Kurdish Newroz (New Year) festival in 2013.

But Demirtas’ lawyers applied to a court in Ankara for his release, arguing that as a signatory to the Council of Europe, Turkey was obliged to respect the Strasbourg judgement. The Ankara court unanimously rejected the petition Friday.

President Recep Tayyip Erdogan had promptly rejected the Strasbourg court’s finding as nonbinding, adding: “We have many things to do in response to this. We will take counter measures.”

The decision came two weeks after the European Court of Human Rights had called for Demirtas’ release , saying his pretrial detention had been inexcusably long and driven by the aim of keeping him out of the political arena.

ANKARA, Turkey — An appeals court upheld the conviction of Kurdish political leader Selahattin Demirtas today, endorsing his imprisonment for terrorist propaganda, causing his party to accuse the judiciary of kowtowing to government.

The government arrested Demirtas, then leader of the pro-Kurdish Peoples' Democratic Party (HDP), in November 2016 and charged him with terrorist-related offenses in numerous courts around the country. But it was only in September of this year, after 22 months in detention, that Demirtas was convicted. The court sentenced Demirtas to 56 months’ imprisonment and Onder to 42 months in jail for their Newroz speeches.

The appeals court confirmed the sentences today, meaning that two of the most effective opposition politicians in the country will be off the public stage for years.

The head of the HDP’s foreign department, Nazmi Gur, condemned the appeal court’s decision in an interview with Al-Monitor. Referring to Erdogan’s statement that he would “take counter measures,” Gur said, “This case is very strong evidence of how the Turkish government can control the legal system.”

Erdogan has often said that Turkish courts are independent. Gur told Al-Monitor that today’s ruling “means Turkish courts are not independent.”

Observers have long questioned the motives for the prosecution of Demirtas.

His Newroz speech of 2013 was overshadowed by that of the imprisoned leader of the Kurdistan Workers Party (PKK), Abdullah Ocalan, who penned a letter calling for peace. After Ocalan’s letter was read out to a vast crowd in Diyarbakir, the prospect of an end to the Kurdish war electrified the country. The speeches of Demirtas and Onder in Istanbul were forgotten.

They were forgotten by the prosecutors as well. It was only when the political climate changed, and the Kurdish insurgency resumed, that the prosecutors filed charges against Demirtas and Onder for speeches delivered three years earlier.

Observers also wondered why, after he had been charged, Demirtas could not have been released on bail pending trial. He was, after all, a well-known figure who could not easily go to ground, a lawyer-politician with a reputation to uphold and a family man.

However, Demirtas is arguably the best and wittiest public speaker in Turkey’s opposition. He is certainly the most charismatic politician in country, earning the epithet "the Kurdish Obama." And the European Court of Human Rights alluded to these qualities in its judgment. The court said that by detaining Demirtas during the referendum of April 2017 and the election of June 2018 the authorities had “pursued the predominant ulterior purpose of stifling pluralism and limiting freedom of political debate.”