ISTANBUL — A Turkish academic on hunger strike for nearly nine months to protest her dismissal after last year’s failed coup has been released from jail.

An emaciated Nuriye Gulmen was sentenced to six years and three months in prison for “membership in an armed terror group,” referring to a left-wing militant group, according to Turkey’s official news agency.

But a court granted her conditional release and she was freed late Friday from a hospital where she was in custody.

Semih Ozakca, a hunger-striking teacher who was released from prison at an earlier hearing, was acquitted.

They are among more than 100,000 civil servants dismissed under the state of emergency declared in Turkey after last year’s coup attempt.

The two said they would continue their hunger strike until they are reinstated.