A court previously ordered Taner Kilic’s release in January but reversed the decision a day later.

A court in Turkey has ordered the release of Taner Kilic, honorary chair of Amnesty International’s Turkish branch, the rights group said in a statement.

Kilic had been in pre-trial detention since June 2017, when he was arrested alongside 22 lawyers for allegedly having links to an outlawed group who the government blames for a failed coup attempt in July 2016.

Authorities accused Kilic of using ByLock, an encrypted communication software which the government says is used by members of the group led by Fethullah Gulen, a self-exiled cleric based in the US. Gulen denies any involvement in the coup bid.

Amnesty International has consistently denied the allegations against Kilic, saying he had never downloaded the application.

{articleGUID}

Kumi Naidoos, Amnesty International’s new secretary general, said the UK-based group was ” overjoyed” at the news about Kilic’s release.

“It has taken us more than a year of campaigning and a struggle to get here, but it appears that Taner will finally be freed,” he said in a statement on Wednesday.

“Whilst we rejoice at this decision, our celebrations will only truly begin when he is safely back at home in the arms of his wife and daughters.”

Andrew Gardner, a researcher for the group, has since published an image of Kilic reunited with members of his family.

Ok now we can start to celebrate. Taner really is free! pic.twitter.com/BdsY2QPki2 — Andrew Gardner (@andrewegardner) August 15, 2018

An Istanbul court had previously ordered Kilic’s conditional release and imposed a travel ban on him, prohibiting him from leaving Turkey, pending his trial.

That ruling was however reversed a day later on February 1, 2018, after state prosecutors filed an appeal contesting the ruling.

The announcement by Amnesty International on Wednesday came a day after a court in Edirne province released two Greek soldiers facing espionage in Turkey. Athens welcomed the move and said the ruling would help mend ties between the two NATO allies.

Turkey’s continued detention of an American pastor has also caused a diplomatic uproar between Ankara and Washington in recent days.

Authorities accuse Andrew Brunson, a Christian Evangelical preacher from North Carolina, of links to outlawed groups. Retaliatory sanctions by the US President Donald Trump‘s administration have seen the lira hit a record low against the US dollar.

Earlier on Wednesday, a Turkish court rejected an appeal for Brunson’s release from house arrest and the lifting of his travel ban, with an upper court expected to render its verdict in the coming few days.