ISTANBUL (Reuters) - A Turkish court on Wednesday ordered the release on bail of eight human rights activists, including the director of the local branch of Amnesty International, pending a verdict in their trial on terrorism charges.

Idil Eser, the director of Amnesty in Turkey reacts after being released the Silivri prison complex near Istanbul, Turkey, October 26, 2017. REUTERS/Osman Orsal

The case against the activists, who number 11 in total and who face up to 15 years in prison if found guilty, has become a flashpoint in Turkey’s tense relations with Europe and heightened concern that an important NATO member is sliding further towards authoritarianism under President Tayyip Erdogan.

Among those ordered released were Idil Eser, the director of Amnesty in Turkey, as well as Peter Steudtner, a German national, and Ali Gharavi, a Swede. Under the terms of their release, Steudtner and Gharavi are not required to remain in Turkey before the next court date on Nov. 22.

Two other activists were released on bail prior to the start of Wednesday’s trial. Another, Amnesty’s local chairman, is still being held in the coastal province of Izmir where he faces charges in a separate case.

“I think we’re all more than relieved,” a tearful Steudtner told reporters after he walked out of the Silivri prison, outside of Istanbul, a few hours later.

“We are really grateful for everyone who supported us legally (and) diplomatically.”

The case had brought widespread condemnation from rights groups, some Western governments and, on social media, prominent activists such as Edward Snowden.

Almost all of the eleven were detained in July after participating in a workshop on digital security held on an island off the coast of Istanbul.

The prosecutor has alleged a range of charges, including helping the Kurdistan Workers Party (PKK) and the network of U.S.-based cleric Fethullah Gulen, accused by Ankara of engineering last year’s coup attempt.

“It is a happy development that our friends are released, but this case should have never been brought,” said one of the defense lawyers, Erdal Dogan.

“We need a state of law and we need the support of our citizens.”

Slideshow ( 6 images )

‘ENCOURAGING SIGNAL’

Germany, which has seen a steady deterioration in ties with Turkey over the case and other rows, said it welcomed the decision, even though it remained concerned about Ankara’s record on rights.

“That is an encouraging signal, a first step,” Foreign Minister Sigmar Gabriel said in a statement, adding that many Germans remained imprisoned in Turkey for no clear reason.

Eser, the local Amnesty director, had earlier told the court that she had been arrested for doing her job.

“I don’t understand how I can be associated with three different terrorist organizations by having attended a workshop,” she said. “I don’t have anything to regret. I just did my work as a human rights defender.”

The prosecutor has cited Amnesty’s links to jailed hunger strikers and alleged that some of the defendants had contact with people who had downloaded the encrypted messaging app used by the plotters of last year’s failed coup.

Another accused, Ozlem Dalkiran, told the court: “I have no idea why we’re here.”

“I dedicated my life to truth, human rights and justice. Now I am here being charged with membership in a terrorist organization,” said Dalkiran, a member of the Turkish arm of the Citizens’ Assembly rights organization.

Authorities have jailed more than 50,000 people pending trial in a crackdown following the failed military coup. Erdogan says the purges across society are necessary to maintain stability in a key NATO country bordering Iran, Iraq and Syria.

European allies fear he is using the investigations to check opposition and undermine the judiciary.

The case has worsened Turkey’s already fraught relations with the European Union.

Shortly after the arrests, Germany said it was reviewing Turkey’s applications to buy weaponry from Germany. A cabinet minister in Berlin compared Ankara’s behavior to that of the former communist East Germany.

German Chancellor Angela Merkel has said Turkey’s 12-year-old attempt to join the European Union should be halted, although Ankara has said it remains determined to press on with its accession process.