A U.S. federal judge has ordered the government to publicly release unclassified evidence that justifies the continued detention of suspected terrorists at Guantanamo Bay, Cuba.

Monday's ruling orders the Justice Department to publicly file its unclassified records, or show the court what information it wants to keep secret, by the end of July.

Judge Thomas Hogan said releasing the documents would satisfy the public's constitutional right to know about the activities at Guantanamo and would ensure better oversight of the legal proceedings.

The ruling was in a lawsuit filed by the detainees' attorneys and a coalition of news agencies.

The Justice Department said the documents were never meant to be sealed indefinitely, and were only classified until the government could determine what information could be publicly released.

U.S. President Barack Obama has vowed to close the detention facility by 2010.  In a recent speech, the president described the military commissions created to prosecute the Guantanamo detainees as a "mess." 

Mr. Obama said some of the 240 detainees awaiting charges will be transferred to ultra-secure "supermax" U.S. prisons and tried in American civilian courts, while others will face military commissions.  He said his administration has so far approved 50 detainees for transfer to other countries.

Some information for this report was provided by AP and Reuters.