Responding to a complaint brought by 427 members of the Turkish judiciary who were arrested after the failed putsch, the court said their detentions were marked by “unlawfulness” and ordered Ankara to pay damages to each applicant.
They had been arrested as part of a mass crackdown on supporters of the US-based Islamic preacher Fethullah Gulen, a former ally of Erdogan who the president blamed for the coup bid.
The ruling is the latest by the Strasbourg-based ECHR against Turkey, a member of the Council of Europe of which the court is a part since 1950.
The court has previously in separate rulings ordered Turkey to free jailed Kurdish politician Selahattin Demirtas and civil society leader Osman Kavala who were arrested in 2016 and 2017 respectively.
The Council of Europe’s committee of ministers has said Turkey’s defiance of the ECHR ruling on Kavala could lead it to open infringement proceedings against Ankara at its next meeting beginning later this month, a procedure that as only been used once before in the history of the court.