The chairman of Amnesty International Turkey has been ordered to remain in custody by a Turkish court.

Thursday's order came just hours after the rights group's Turkey director and seven other human rights activists, including two foreign nationals, were released pending trial on bail in a separate case.

A court in the western city of Izmir ruled that Taner Kilic should remain behind bars under pre-trial detention.

He is accused of having links to a group led by Fethullah Gulen, a US-based self-exiled religious leader who the government blames for last year's coup attempt, a claim that Kilic and Amnesty Turkey strongly deny.

Authorities say Kilic was using ByLock, an encrypted communication software which the government says is used by members of the outlawed group.

Late on Wednesday, eight human-rights defenders, including Amnesty's director in Turkey Idil Eser, German national Peter Steudtner and Swedish national Ali Gharavi were released from the prison.

Three others involved in the case were being tried without detention.

Accusations towards them include supporting groups that Turkey has proscribed as "terrorist" organisations, such as the Gulen group and Kurdish separatist factions.

{articleGUID}

If convicted, the activists could face up to 15 years in prison.

Following the decisions, Salil Shetty, Amnesty International's secretary-general said: "Over the last 24 hours we have seen the twin hands of Turkey's fickle justice system at play. While one grants liberty, the other, confronted with no less baseless charges, takes it away.

"[Last night's verdict] restored some faith in Turkey's justice system. Today, that faith has been washed away. Turkish authorities have repeatedly and publicly presumed Taner Kılıc's guilt, on the basis of innuendo and unsupported allegations."

For more than a year, the Turkish government has been carrying out detentions and purges of tens of thousands of people in the wake of a failed coup attempt in July 2016.

Local and international rights groups have accused the government of using the coup attempt as a pretext to silence opposition in the country.

The government has said that the purges and detentions are aimed at removing supporters of Gulen from state institutions and other parts of society.