ISTANBUL (AP) — Turkey unlawfully detained the head of the country’s of Amnesty International branch for 14 months, the European Court of Human Rights said in a judgement Tuesday.

Taner Kilic was imprisoned following his arrest in June 2017 on suspicion of belonging to the group Ankara accuses of orchestrating a 2016 coup attempt.

However, the Strasbourg-based court ruled there were no reasonable grounds of suspicion to warrant his detention, which it said was “unlawful and arbitrary”.

It also decided that his incarceration on a second set of terrorism-related charges was “directly linked to his activity as a human rights defender” and therefore interfered with his freedom of expression.

Turkey was ordered to pay 24,500 euros ($26,300) in damages and 10,000 euros ($10,735) in costs by the court, which upholds the European Convention on Human Rights.

Kilic, a human rights lawyer who is now Amnesty’s honorary chair in Turkey, was initially arrested on suspicion of using an encrypted phone messaging app associated with the group widely believed in the country to be behind the attempt to topple President Recep Tayyip Erdogan.

Led by Fethullah Gulen, a former imam living in the U.S. since 1999, the group has been labelled by Ankara as a terror organization. Gulen has always denied any involvement in the failed putsch.

Kilic was accused of belonging to the group due to his alleged use of the phone app as well as other alleged links, such as newspaper subscriptions, his children’s schooling and holding accounts in a bank linked to the Gulen movement.

The court found this “mere circumstantial evidence” did not give rise to a reasonable suspicion of committing the offense.

He was later accused of ties to other terrorist organizations. However, the court said these charges related to the “the ordinary peaceful and legal acts of a human rights defender,” such as organizing a workshop for civil society groups, exchanging messages about protests and raising awareness over rights abuses.

Kilic was sentenced to six years and three months imprisonment in July 2020 for belonging to a terrorist organization. He is currently free awaiting an appeal verdict.

“Despite the fact that every single allegation levelled against him was comprehensively exposed as baseless during the trial, the court in Turkey convicted Taner Kilic, who still faces a return to jail to serve out the rest of his politically motivated sentence,” said Nils Muiznieks, Amnesty’s Europe director.

Calling for the conviction to be quashed, Muiznieks described the case as part of a wider crackdown on rights and freedoms.

The European Court of Human Rights has previously ruled against the detention of two high-profile detainees in Turkey – Selahattin Demirtas and Osman Kavala.

Demirtas, the former head of the Peoples’ Democratic Party, or HDP, has been in prison since 2016 on a wide range of charges while philanthropist Kavala was sentenced to life without parole in April for links to protests in 2013.