ISTANBUL - An Istanbul court ordered the continued detention of Taner Kilic, the head of Amnesty International in Turkey, in a dramatic reversal of its decision to release him into judicial control within 24 hours which the rights group slammed as a “travesty of justice”.

Kilic has been held since June 2017 in the western city of Izmir, accused of links to US-based preacher Fethullah Gulen who Turkey says ordered a failed coup in July 2016. Amnesty has denounced the allegations against Kilic as “baseless”.

“The Istanbul court has now overturned its own release verdict,” Turkey’s Amnesty researcher Andrew Gardner said on Twitter. “This is devastating for Taner’s family and a disgrace to justice.”

To the delight and relief of Taner’s family and friends, the Istanbul court had on Wednesday ordered his release on judicial control, meaning he would remain charged but have to report regularly to the authorities.

But their joy was sapped hours later after he was taken back into custody straight after his release.

It later emerged that the prosecutor had appealed the decision to release him on Wednesday, while a second court ordered his continued detention and issued an arrest warrant, Gardner told AFP.

Then on Thursday the first court reversed its own decision, he added.

The case has sparked major concerns over freedom of expression in Turkey, with activists accusing the authorities of using the state of emergency to crack down on opponents.

The emergency was imposed following the July 2016 attempted putsch and was renewed for a sixth time last time.

Some 55,000 people have been arrested and 140,000 public sector workers sacked or suspended in its aftermath over alleged links to Gulen.

Gulen and his followers deny any links to the coup, and reject the Turkish government’s attempt to label them as a terrorist group.

Amnesty slammed the decision and urged the authorities to release Kilic, with its secretary general, Salil Shetty, describing the move as “a travesty of justice of spectacular proportions”.

He added: “To have been granted release only to have the door to freedom so callously slammed in his face is devastating for Taner, his family and all who stand for justice in Turkey,” Shetty said.

“This latest episode of his malicious detention has dashed the hopes of Taner and those of his wife and daughters who were waiting by the prison gates all day to welcome him into their arms,” he added.

Amnesty’s Europe director Gauri van Gulik said on Twitter she was in Ankara to meet Turkish Foreign Minister Mevlut Cavusoglu: “Grateful for his time. Clear what will be on the agenda. #FreeTaner”.

France said it learned “with deep concern” about the continued detention of Kilic and called for his “speedy release”.

“France is committed to everyone’s right to a fair trial”, a French foreign ministry spokeswoman said in a statement.

“We again call on Turkey to respect its European and international commitments on human rights and fundamental freedoms.”

Amnesty said it would not stop campaigning for Kilic’s freedom.

Authorities accused Kilic of having an encrypted messaging application on his phone in August 2014 called ByLock, which Ankara claims was especially created for Gulen supporters.

But Kilic has vehemently denied he ever had the app.

Amnesty has said two independent forensic analyses that they commissioned showed no trace of ByLock on Kilic’s phone.

He is on trial with 10 other rights activists including Amnesty’s Turkey director Idil Eser, German activist Peter Steudtner and Swedish colleague Ali Gharavi on terror charges after holding a workshop on an island off Istanbul.

Kilic is voluntary chairman of Amnesty’s board of directors handling administrative affairs while Eser is in charge of day-to-day business including Amnesty Turkey’s campaigns for human rights.

The other 10 were all released last year though their trial continues, with the next hearing set for June 21.

They are accused of links to Gulen and other outlawed groups including the Kurdistan Workers’ Party (PKK), which has waged a three-decade insurgency against Turkey, and the far-left Revolutionary People’s Liberation Party-Front (DHKP-C).

President Recep Tayyip Erdogan has previously said that the activists were detained for working against the government, likening them to those involved in the attempted coup.