Judge Royce Lamberth issued the brief order yesterday after the US government dropped its opposition to his release.
Attorneys for Ibrahim Idris argued he is so ill he could not pose a threat to anyone. The Sudanese prisoner suffers from ailments that include diabetes and schizophrenia so severe that he has been catatonic in meetings with lawyers and doctors.
He was suspected of once being a fighter and courier for al-Qaida but diagnosed as mentally ill shortly after his arrival in Guantanamo in January 2002. He is likely to be returned to Sudan.