ISTANBUL (AP) — A Turkish court has rejected an appeal to release the former head of Turkey's pro-Kurdish opposition from pre-trial detention, despite a ruling by the European Court of Human Rights.

Turkey's official Anadolu news agency said the court on Friday turned down the release application by Selahattin Demirtas' lawyers. The former co-chairman of the Peoples' Democratic Party was arrested more than two years ago on terrorism charges.

Last week, the ECHR ordered Turkey to end Demirtas' pre-trial detention, saying his rights to a speedy trial and free elections were violated. It said his continued detention would be a breach of Turkey's obligation to abide by the court's judgment.

Demirtas was sentenced to four years in prison for terror propaganda in support of outlawed Kurdish rebels and has several other trials pending.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.