|Rights groups have long criticised the US over the Guantanamo prison [GALLO/GETTY]
Al Jazeera looks at the background of the controversial Guantanamo Bay prison camp in Cuba and what its closure - ordered by Barack Obama, the new US president - means for the US and its legacy.
The US naval base at Guantanamo Bay in Cuba, on a 78-square-kilometre scrap of arid soil, is the oldest US military base outside the US.
Camp Delta, inside the area, is the infamous detention centre that has housed detainees since the previous facility, Camp X-Ray, closed.
Here reside the inmates, or "unlawful enemy combatants" as they are designated by US authorities, most of whom were captured during the US-led war in Afghanistan in 2001.
On January 11, 2002, the first detainees were brought to the facility. More than 800 in total have been housed in the camp.
|The conditions at Guantanamo have come
under scrutiny [AFP]
So far around two-thirds of the detainees have been released and about 240 remain.
At least five detainees were teenagers at the time of their capture, one was aged only 13, reports at the time said.
The facility has been condemned by the United Nations, the European Union, and numerous human rights groups, and many in the US argue that the camp had become a liability.
Towards the end of his second term in office as US president, George Bush acknowledged that he would "like to close" it.
And now the new administration under Obama has decided to do just that, ordering its closure within a year and the setting up of a series of reviews to determine whether it is possible to transfer prisoners to their home countries.
Should this not be deemed possible, the White House said it would examine options for prosecuting them, and it has also ordered that all prisoners held at the facility be held in a manner consistent with the Geneva Conventions until the facility is closed.
What the options are, what the timeframe will be for any trials or resettlement, or even where some detainees unable to return to their home countries will be sent, remain unclear.
When Al Jazeera visited the facility in 2007, it found that in maximum security Camp 5, detainees are held in solitary confinement, under 24-hour guard.
Each small concrete cell contains a metal sink and toilet, a thin mattress, personal hygiene items and religious items.
There are interrogation rooms in each corridor with shackles set into the floor.
One military officer told Al Jazeera: "Each one is a little different, some have the la-z-boy [recliner chair] ... some have a love seat or couch, but it's the same basic design with TV, refrigerator, coffee maker."
In another part of the base, detainees in medium-security camp Delta get more privileges - if they obey the rules.
The prison's existence has long been condemned by human rights groups as counter-productive in the so-called "war on terror" and damaging to the United States' global image.
In June 2006, three detainees committed suicide by hanging themselves with nooses made from bed sheets, and human rights groups say dozens more have attempted to kill themselves.
The US military called their deaths a form of attack, but rights groups said the deaths showed the despair of inmates, some of whom have been held for seven years without trial.
Human rights groups such as Amnesty International and the American Civil Liberties Union (ACLU) have also alleged that inmates have been tortured.
Several released inmates have also made claims they were subjected to harsh interrogations.
One of them is British citizen Moazzam Begg, held for almost three years in Guantanamo, who said he had been shackled, kicked and punched during interrogations.
Indeed the Central Intelligence Agency (CIA) admitted in February 2008 that it had used the controversial "waterboarding" technique - which makes a detainee feel as if he is drowning - on three Guantanamo suspects, including Khalid Sheikh Mohammed, the alleged planner of the September 11, 2001, attacks.
In October 2006, Bush signed into law a bill outlining standards for military tribunals of detainees, after the US Supreme Court ruled that tribunals set up to prosecute those held in the facility violated US and global law.
|Khalid Sheikh Mohammed's trial was halted
following an order from Obama [EPA]
However, since then, only three trials have been successfully held and concluded.
One was that of Australian citizen David Hicks, who pleaded guilty in March 2007 to aiding Afghanistan's Taliban government and was sent back to Australia to serve his sentence.
Yemeni national Salim Hamdan was convicted in August 2008 of aiding al-Qaeda and sentenced to five and a half years in prison.
He had already served five years and a month at Guantanamo Bay prison at the time and was transferred back to Yemen in December last year, where he has reportedly since been released.
The final conviction was that of Ali al-Bahlul, another Yemeni national, who was convicted in November 2008 of performing "media relations" on behalf of Osama bin Laden, the al-Qaeda leader, and sentenced to life in prison.
A day after he entered office on January 20 this year, Obama requested a halt for 120 days of all of the six military tribunals of al-Qaeda suspects that were being held at the camp, including five of those suspected of involvement in the September 11 attacks.
One of those on trial was Khalid Sheikh Mohammed while another was Omar Khadr, a Canadian detainee who was arrested in Afghanistan at the age of 15 and stands accused of killing a US soldier with a grenade in Afghanistan in 2002.
Rights groups have been swift to point out that much of Khalid Sheikh Mohammed's confession would be problematic, as the CIA has admitted to using the "waterboarding" technique on him.
Throughout the Bush administration US officials insisted that Guantanamo had been a vital tool in the global "war on terror".
"We understand that they are dangerous men, and we understand that they are willing to kill Americans here in Guantanamo," Rear Admiral Harry Harris, the Guantanamo Joint Task Force Commander, told Al Jazeera in 2007.
"I am convinced that they are in fact terrorists. I am convinced that they are in fact dangerous men. I am convinced that they are all in that category."
While Obama has now ordered the prison shut, the debate about the usefulness it served or harm it caused, will very likely continue.