ANKARA - Turkish authorities have dismissed more than 90,000 public servants for alleged connections to a coup attempt in July as part of a purge critics say has broadened to target any political opposition to President Tayyip Erdogan.

Speaking to reporters at a roundtable interview broadcast on television, Labour Minister Mehmet Muezzinoglu said 125,485 people from the public service had been put through legal proceedings after the coup attempt, and that 94,867 of those had been dismissed so far.

Turkey has been rooting out followers of the US-based Muslim cleric Fethullah Gulen, whom it accuses of having infiltrated state institutions and plotted to overthrow the government. Gulen, who has lived in self-imposed exile in Pennsylvania since 1999, has denied the charge and condemned the coup.

Some 40,000 people from the police, the military, the judiciary, the civil service or the education system, have been remanded in custody pending trial for alleged connections with the coup attempt, during which at least 240 people were killed.

Meanwhile, a UN court on Tuesday ordered Turkey to release a judge detained in a crackdown after last year's attempted coup so that he can resume his work on an appeals case.

Turkey was ordered "to cease all legal proceedings against Judge Aydin Sefa Akay and to take all necessary measures to ensure his release... no later than 14 February," the tribunal said.

Akay was one of 41,000 people arrested in the aftermath of the failed July 15 coup bid to unseat Turkish President Recep Tayyip Erdogan.

He is also part of a five-judge bench hearing the appeal of former Rwandan minister Augustin Ngirabatware, who was sentenced to three decades in jail for his role in the 1994 genocide in the African nation.

Ngirabatware's case is being heard at the UN's Mechanism for International Criminal Tribunals (MICT) based in The Hague.

Presiding judge Theodor Meron in Tuesday's order also denied Ngirabatware's request to be released until the legal dilemma is resolved.

Earlier this month, Turkey snubbed a hearing at the tribunal despite notices sent to Turkish embassies in Dar es Salaam, in Tanzania - where Ngirabatware is currently behind bars - and in The Hague.

The MICT documents were instead sent back marked "Return to Sender", the court heard.

Judge Meron said "diplomatic immunity (for judges) is a cornerstone of an independent international judiciary, as envisaged by the United Nations."

He also rejected the prosecution's argument that Akay should be replaced on the bench to allow the case to continue.

Replacing Akay "will have a chilling effect on the administration of justice as it would allow interference by a national authority in the conduct of a case and exercise of judicial functions," Meron said.

The MICT added Tuesday's order is binding on Turkey under UN Security Council Resolution 1966 which requires all states to comply with rulings of its courts.

Akay has denied any link to the organisation of Fetullah Gulen, the US-based preacher blamed by Ankara for the putsch attempt.

According to Turkey's state-run news agency Anadolu, prosecutors accuse Akay of being a key figure in a masonic lodge tied to Gulen.