Leading article: Revelations that highlight a president's broken promise

Barack Obama is not the first US president to find himself held hostage to a campaign pledge that he has been unable to redeem in office. On the campaign trail, he promised to close the prison that had come to symbolise the most controversial aspect of President George Bush's "war on terror". Aides to the then president-elect in January 2009 predicted that Mr Obama would issue an executive order declaring the imminent closure of the camp on his first day in office. Two years on, and ten years on from the 2001 bombings in New York, that pledge is unfulfilled – to the dismay of his most ardent supporters on the centre-left.

Not only are 172 men still locked up in Guantanamo but all real movement to close the camp has been abandoned. Meanwhile, the release of more than 700 classified military documents obtained by WikiLeaks last year sheds new light on why many remaining prisoners have no prospect of being either released or tried, let alone tried before a civilian court, which was another key element of Mr Obama's now forgotten promise.

The latest leaks make it clearer than ever that several hundred men were incarcerated for years on evidence that would never have stood up in a court, either because it was vague or hopelessly tainted. It came either from witnesses who were known to be unreliable as a result of psychiatric problems, or who had been tortured, or who later admitted that they briefed against fellow prisoners to advance their own chances of early release.

A separate, disturbing revelation that emerges from the leaked documents concerns the number of prisoners who were deemed dangerous but were nevertheless palmed off on third countries simply to get rid of them. Overall, the leaks confirm a disturbingly inconsistent approach on the part of the US authorities when it came to agreeing to releases. It appears that prisoners were not sent back to their countries of origin on the basis of how dangerous they were but on the basis of whether the home country was a good friend to the US or not. Prisoners were returned to Saudi Arabia, a US ally, whatever the assessment of the danger that they represented, as they were to Europe and Turkey. But they have not been returned to Yemen, which is also friendly to the US, because it is deemed too unstable to be trusted with handling such returnees.

As hopes of closing the camp fade, the future of the detainees is unclear. A hard core of about 47 have been deemed too dangerous for release. But there is apparently not enough evidence for them to be put on trial, even before a military tribunal, which begs the question of whether they are to remain incarcerated for ever in a legal no man's land, victims of an almost Kafkaesque judicial anomaly that most people would more normally associate with the old Soviet Union than with the self-styled land of the free.

President Obama has not been totally inactive over Guantanamo. His critics should bear in mind that, had a Republican been in control of the White House over the past two years, the number of inmates at Guantanamo might have grown. At least Mr Obama has overseen a reduction in numbers held in the camp and outlawed the kind of interrogation techniques that human rights groups have rightly condemned as torture.

The President's supporters insist that it's not his fault. A well-meaning pledge was felled by Republican hostility in Congress, unexpected legal complexities and plain fatigue in an administration overwhelmed by so many other issues, from the economy to the Gulf oil spill. All true, but it is still shameful that the willpower needed to close this prison failed along the way, and that this blot on America's name has not been erased.