Nuriye Gulmen, a literature professor, and Semih Ozakca, a primary school teacher, who have been on hunger strike after they both lost their jobs in a crackdown following a failed July coup against President Tayyip Erdogan, take part in a protest against a government purge in Ankara, Turkey, May 11, 2017. REUTERS/Stringer

ANKARA (Reuters) - Turkey has jailed two teachers who have been on hunger strike for more than two months protesting against a government crackdown in which they lost their jobs after last year’s failed coup, their lawyer said on Tuesday.

The detention of the two - literature professor Nuriye Gulmen and primary school teacher Semih Ozakca - led to protests on Tuesday in which police fired tear gas at pockets of demonstrators in Ankara and Istanbul and detained at least a dozen people.

An Ankara prosecutor jailed Gulmen and Ozakca on the grounds that their protest was an act committed in the name of DHKP-C, a leftist group deemed a terrorist organization by Turkey, a court document seen by Reuters showed.

“The failure to arrest the suspects would prevent the functioning of the law,” the prosecutor said in the court document.

Police detained them because they feared “that their protest could turn into death fasts and new Gezi protests,” Selcuk Kozagacli, a lawyer representing the teachers had said on Monday. The two, weakened by their hunger strike, are both now in wheelchairs.

Kozagacli was referring to large anti-government demonstrations four years ago when hundreds of thousands of people took to the streets to protest against plans to build replica Ottoman barracks on Gezi park in central Istanbul.

The teachers have said their hunger strike is aimed at highlighting the plight of around 150,000 state employees suspended or sacked after last July’s failed putsch, which president Tayyip Erdogan blames on followers of a U.S.-based cleric.