"What makes us exceptional", Barack Obama told the US military academy at West Point to great applause last week, "is not our ability to flout international norms and the rule of law; it is our willingness to affirm them through our actions".

He added, to further applause: "And that's why I will continue to push to close Gitmo – because American values and legal traditions do not permit the indefinite detention of people beyond our borders."

A few days later, five prominent Taliban detainees at Guantánamo Bay were released in exchange for Sergeant Bowe Bergdahl, captured by the Taliban five years ago after allegedly going AWOL.

"The US army is the biggest joke the world has to laugh at," he wrote in his last email to his parents published by Rolling Stone magazine. "It is the army of liars, backstabbers, fools, and bullies", he said.

The Taliban prisoners released include Khirullah Said Wali Khairkhwa, a close associate of Osama bin Laden and Mohammad Omar, the Taliban's leader, according to an assessment by US defence officials at Guantánamo Bay later released by WikiLeaks.

Mullah Mohammed Fazi, was a senior Taliban commander believed to have ordered the massacre of thousands of Shiite Muslims near Kabul between 1998 and 2001. Mullah Norullah Noori, a former provincial governor is believed to have been involved in the massacre.

Abdul Haq Wasiq, a former senior Taliban intelligence official, and Mohammed Nabi Omari, described as a a member of a al-Qaeda-Taliban cell in eastern Khost.

US officials have described the five as prisoners of war. Under the exchange deal, they will remain in Qatar for a year.

Meanwhile, Shaker Aamer, the last UK resident held in Guantánamo Bay remains incarcerated in the US military base in Cuba. He has been detained there for the past twelve years without being charged with any offence and despite repeated protests from the British government.

Speaking from his prison cell for the first time last November, Aamer said: "Tell the world the truth ... Please, we are tired. Either you leave us to die in peace – or tell the world the truth. Let the world hear what's happening,"

Aamer added: "You cannot walk even half a metre without being chained. Is that a human being? That's the treatment of an animal."

Aamer, 45, was born in Saudi Arabia, has British residency, and his British wife and their four children all live in south London.

According to leaked alleged confessions, while he was in London Aamer was "assessed to be a key member of the UK-based al-Qaida network with multiple associations to senior al-Qaida members". Shaker has denied the claims made about him.

Dr Emily Keram, who earlier this year assessed Aamer at the prison, reported that he had "psychiatric symptoms related to his current confinement...which also gravely diminish his mental health."

She also notes that "the length, uncertainty, and stress of Mr. Aamer's confinement has caused significant disruptions in his...ability to function. He is profoundly aware of what he has lost."

She concluded: "Mr Aamer requires psychiatric treatment, as well as reintegration into his family and society and minimization of his re-exposure to trauma and reminders of trauma."

Keram's report gave details of Aamer's physical ailments, including severe edema which "if left untreated, may reflect an underlying life-threatening organ or vascular dysfunction."

Reprieve, the legal charity which represents Aamer has now written to William Hague the foreign secretary, referring to what Cori Crider, a director of the charity, has called a landmark US court ruling. The District Court in Washington ruled that the lawyers can view videotapes relating to another Guantánamo Bay detainee. Crider says Hague should demand to see the vidoes of Aamer.

"He remains held at the prison, beyond the rule of law, despite several very welcome requests by yourself, the prime minister and the deputy prime minister for him to be returned to his family in London.

"FCEing [Forceable Cell Extractions] , the brutal method whereby prisoners are dragged out of their cells by armed guards, has been enacted hundreds of times on Shaker", added Crider.

The Foreign Office said in a statement on Tuesday: "Mr Aamer's case remains a high priority for the UK Government and we continue to make clear to the US that we want him released and returned to the UK as a matter of urgency".

It added: " We are confident that the US Government understands the seriousness of the UK's request for Mr Aamer's release. Any decision regarding Mr Aamer's release ultimately remains in the hands of the United States Government."

The FO has said that many times before.