Updated

A Turkish court has convicted a United Nations judge of membership in an extremist group, the country's state run news agency reported; a conviction that drew a rebuke Thursday from the UN court he works for.

Anadolu news agency reported that a court in Ankara on Wednesday sentenced Aydin Sefa Akay, a Turkish national, to seven and a half years in prison for "membership in an armed terror group."

Akay, a retired ambassador and a judge at the UN Mechanism for International Criminal Tribunals (MICT), was accused of links to U.S.-based cleric Fethullah Gulen.

Turkey claims Gulen was behind the bloody failed coup last summer. He denies the allegations.

Akay was arrested in September as part of a massive crackdown on alleged followers of the cleric, drawing criticism from the UN. Following the guilty verdict, the Turkish court ordered his release under judicial control and barred him from leaving Turkey.

Theodor Meron, the president of the Hague-based MICT, said in a statement following the conviction that he "deeply regrets this action of the Turkish authorities, in further breach of Judge Akay's protected status under the international legal framework."

Meron reported Turkey to the United Nations Security Council in March for failing to comply with an order to release Akay. In January, the UN court had given Ankara until Feb. 14 to free Akay and halt legal proceedings against him, saying he is protected by diplomatic immunity.