Police used pepper spray and water cannons on the protesters as they gathered in Kizilay square in central Ankara. Some protesters were dragged away by police and detained, but others returned shortly afterwards trying to continue their protest.

Literature professor Nuriye Gulmen, 35, and primary school teacher Semih Ozakca, 28, went on hunger strike after losing their jobs under a government decree as part of a widening purge of the public sector after a failed military coup last July.

A court ordered their detention pending trial after ruling that their hunger strike protest was being conducted on behalf of an outlawed far-left group known as the DHKP-C.

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

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

Human rights groups and the European Union have said President Tayyip Erdogan is using the crackdown to stifle dissent in Turkey, a charge he and his government deny.