US President George W Bush has said he would like to "end" the detention centre in Guantanamo Bay in Cuba.
Some inmates have been at the detention camp since 2002
But in an interview on German TV he says he must wait for a Supreme Court ruling on whether inmates could be tried by military or civilian courts.
Around 490 detainees are in Guantanamo Bay, which opened in January 2002.
There has been international criticism of conditions at the US camp and the length of time detainees have been held there without trial.
Rights groups have said the detainees, held on suspicion of involvement in terrorism, are mistreated through cruel interrogation methods - a charge the US denies.
"We're at war with an enemy. And obviously we've got to protect ourselves," said Mr Bush.
"I would very much like to end Guanatanamo," he went on.
"I would very much like to get people to a court."
The Supreme Court is expected to decide in June whether military tribunals can hear the cases of the detainees.
White House National Security Council spokesman Frederick Jones said Mr Bush was repeating a long-held policy that the US "has no intention of permanently detaining individuals".
"We want to see all these individuals brought to justice," Mr Jones said.
The US last month released its most comprehensive list yet of those held in Guantanamo Bay.
Many of those named had been held at the camp for more than four years.