A European lawmaker on Friday visited an academic and a teacher in Turkey who have been on hunger strike for more than two months to protest against their dismissal by the government.

Both were fired under state of emergency decrees declared after last July's failed coup attempt aimed at ousting President Recep Tayyip Erdogan's government.

Italian Gianni Pittella, a member of the European Parliament, who also heads the Progressive Alliance of Socialists and Democrats Group in the legislature, addressed a crowd of some 200 people in Ankara in support of the pair.

"Turkey deserves a full democracy, and I am here to share their struggle," he said.

Former primary school teacher Semih Ozakca and academic Nuriye Gulmen began their hunger strike 65 days ago and have been surviving on water alone.

Some 47,000 people have been arrested under the state of emergency imposed after the coup, while tens of thousands more have lost their jobs.

Gulen, who has been in self-imposed exile in Pennsylvania, has denied the charges.

Turkish police on Friday broke up a gathering of supporters of Ozakca and Gulmen and briefly detained four people. Later in the day, the crowd gathered again, shouting slogans such as "Pressure will not discourage us".

Supporter Mehmet Dersulu, also a former teacher dismissed in February, said the government had sent a medical team to check on the hunger strikers' condition.

"Of course their state of health is worrying," he said. "But they only have one request: to get their job back."