ISTANBUL (Reuters) - A Turkish professor who has been on hunger strike since losing her job in a purge following last year’s failed coup was convicted on Friday of belonging to a banned far-left group but the court ordered her release pending an appeal.

FILE PHOTO: Nuriye Gulmen, a literature professor, and Semih Ozakca, a primary school teacher, who have been on hunger strike take part in a protest against a government purge in Ankara, Turkey, May 11, 2017. REUTERS/Stringer

Nuriye Gulmen, 35, was sentenced to six years and three months in jail for being a member of the militant leftist DHKP-C group, deemed a terrorist organization by Turkey, defense lawyers told Reuters. She was found not guilty of lesser charges including organizing illegal rallies.

The literature professor had been hospitalized before the trial began due to her worsening health after seven months of surviving on water, herbal tea and sugar and salt solutions.

Primary school teacher Semih Ozakca, 28, who has also been on hunger strike since losing his job in the crackdown, was acquitted on similar charges. The Ankara court had ordered his release on Oct. 21 for the remainder of the trial, on condition that he wear an ankle monitor.

Both deny any links to DHKP-C.

A third defendant, Acun Karadag, was acquitted on a lesser charge of participating in illegal rallies.

The teachers have said their hunger strike aimed to highlight the plight of some 150,000 state employees -- including academics, civil servants, judges and soldiers -- suspended or sacked since the abortive coup in July 2016.

The pair were detained in May and jailed pending the start of the trial in September. On Sept. 12, days before the teachers were due in court, Turkey issued detention warrants for the lawyers who were set to defend them.

Turkish authorities blame the coup attempt on U.S.-based Muslim cleric Fethullah Gulen and his supporters. Gulen condemned the coup and denies involvement.

Human rights groups and the European Union have said President Tayyip Erdogan is using the crackdown to stifle dissent in Turkey, an assertion that he denies.