A Turkish judge assigned to a United Nations war crimes panel has been detained by Turkish authorities in the aftermath of a failed coup in July, despite having diplomatic immunity.

The president of the Mechanism for International Criminal Tribunals, Theodor Meron, told the United Nations General Assembly on Wednesday that Judge Aydin Sefa Akay was detained around Sept. 21 "in relation to allegations connected to the events of July 2016 directed against the constitutional order of Turkey."

The mechanism is an organization that was established to deal with residual legal issues and appeals stemming from cases before the UN tribunals dealing with atrocities in Rwanda and the former Yugoslavia.

Meron has used his speech at the U.N. to call on Turkey to immediately release Akay, who remains in custody.