ISTANBUL (Reuters) - The European Court of Human Rights (ECHR) urged Turkey on Tuesday to swiftly process the legal case of the ex-head of the pro-Kurdish opposition, saying his pre-trial detention had gone on longer than could be justified.

FILE PHOTO - A supporter of Turkey's main pro-Kurdish Peoples' Democratic Party (HDP) holds a mask of their jailed former leader and presidential candidate Selahattin Demirtas during a rally in Ankara, Turkey, June 19, 2018. REUTERS/Umit Bektas

Selahattin Demirtas, former co-chairman of the Peoples’ Democratic Party (HDP) and one of Turkey’s best known politicians, was sentenced in September to more than four years in jail on terrorism charges related to a speech he gave in 2013.

Having already spent nearly two years in prison awaiting trial for those alleged offences, he had effectively already served out the prison term handed down by the Turkish court.

But Demirtas remains in prison facing several more terrorism-related charges, mostly for other speeches he gave, that could see him sentenced to up to 142 years in jail if found guilty.

“The Court found that the judicial authorities had extended Mr Demirtas’ detention on grounds that could not be regarded as ‘sufficient’ to justify its duration,” the Strasbourg-based ECHR said in a statement.

The ECHR ruled that Ankara “was to take all necessary measures to put an end to the applicant’s pre-trial detention”.

Following the ruling, Demirtas’ lawyer, Mahsuni Karaman, said he had applied for the politician’s immediate release at a criminal court in Ankara. “After this decision, every second Mr Demirtas remains jailed is a restriction on freedom,” he said.

Demirtas himself said the court’s ruling had confirmed his status as “a political hostage” and said the ECHR ruling had shown the “grave violations” by Turkish courts, including the Constitutional Court, during his detention.

“The cases and charges I was being prosecuted for have completely collapsed,” Demirtas said in a statement. “Our battle for law and justice will continue under all circumstances.”

Slideshow ( 2 images )

LEGALLY BINDING

However, President Tayyip Erdogan dismissed the ruling as not binding and said Turkey would take steps against the decision.

“There are many things we can do in response. We’ll make our counter move and finish the job,” Erdogan told reporters in parliament, without elaborating.

ECHR rulings are legally binding, but there have been many instances in which Turkey has not implemented them. Justice Minister Abdulhamit Gul said the final decision on Demirtas’ cases would be made by the Turkish judiciary.

The government accuses the HDP of links to the outlawed Kurdistan Workers Party (PKK), considered a terrorist organization by Turkey, the European Union and the United States. The HDP denies this.

The ECHR also criticized Turkey for keeping Demirtas detained during a constitutional referendum in 2017 and this year’s presidential election.

“The extensions of Mr Demirtas’ detention, especially during two crucial campaigns... pursued the predominant ulterior purpose of stifling pluralism and limiting freedom of political debate,” it said.

The court, which awarded Demirtas 10,000 euros ($11,430) in damages and a further 15,000 euros in costs, ruled against a number of his other complaints and accepted that he had been arrested and detained on “reasonable suspicion” of having committed a criminal offense.

Kati Piri, the European Union’s Rapporteur on Turkey, said the clear ECHR verdict meant Demirtas should be released immediately, adding: “His detention is of a political, not a criminal nature.”

Kerem Altiparmak, a prominent Turkish human rights advocate and professor, also called for Demirtas’ immediate release, as his pre-trial detention was now in violation of both domestic and international law.