Salim Hamdan, Osama bin Laden's personal driver, will enter a specially built courtroom in Guantanamo Bay tomorrow for the first full trial of any of the hundreds of detainees to have been sent to America's infamous prison camp since the 9/11 attacks nearly seven years ago.

Instead of one of al-Qa'ida's top leaders in captivity – such as Khalid Sheikh Mohammed – the accused in the first US military tribunal since the Second World War is a 39-year-old Yemeni, whose lawyers say he belongs on a psychiatric ward rather than in jail. Heightening the irony, a military judge has overruled prosecutors and decided that Mr Hamdan's lawyers can question the alleged mastermind of the September 2001 attacks and other possible witnesses about the driver. The judge threatened to delay the trial if prosecutors did not arrange this over the weekend.

Even the US does not claim that the driver and sometime mechanic, who earned a mere $200 (£100) a month, was a major terror figure. But prosecutors allege that he carried weapons used by al-Qai'da and helped to spirit Bin Laden out of Afghanistan after the fall of the Taliban. If convicted, he could find himself in prison for life.

Download the new Independent Premium app Sharing the full story, not just the headlines

For many, however, it is the erosion of America's historic liberties that will be on trial tomorrow. The Bush administration created a system of detention without due process when it set up the Guantanamo prison camp in 2002, a legal limbo in which hundreds of detainees – including Mr Hamdan, according to his lawyers – have suffered psychological and possibly physical torture. The driver is alleged to have gone mad as a direct result of being kept in solitary confinement for 22 hours a day in a tiny cell; he is hardly the ideal subject for the first major test of President George Bush's much-criticised system of military commissions to bring terrorism suspects to justice.

Mr Hamdan left his home in Yemen in 1996 and tried to sign on as an Islamist fighter in Tajikistan, but could not get into the country. The US says he went to Afghanistan instead, and ended up working for Bin Laden. After the terror attacks on New York and Washington, Mr Hamdan drove al-Qa'ida's supreme leader between safe houses to avoid US missiles, according to prosecutors, who say he broke away a month later and evacuated his daughter and pregnant wife from Kandahar in the midst of the invasion.

It is not only Mr Hamdan's future that will be determined by the trial. There is great concern among members of the Bush administration that they too could find themselves before foreign or international courts for the role they played in facilitating and encouraging the torture of detainees.

The infamous "torture memos" circulated by Vice-President Dick Cheney's chief of staff, Charles Addington, and two former administration figures, Douglas Feith and Alberto Gonzales, covertly approved the abuse of prisoners by the CIA. These men were publicly warned recently by Lawrence Wilkerson, chief of staff to Colin Powell when Mr Powell was Secretary of State, to "never travel outside the US, except perhaps to Saudi Arabia or Israel".

One of the most explosive parts of the trial could be the efforts by the defence to show in coming weeks that Pentagon officials interfered with military prosecutors and pressed cases for strictly political reasons. Hearings on that issue are expected to reveal how White House officials and aides of Mr Cheney were on the phone to Guantanamo – in a way, some claim, that made a mockery of American military justice. The former chief Guantanamo prosecutor, Colonel Morris Davis, a harsh critic of the way the war crimes tribunal system is run, could even testify for Mr Hamdan.

Since the US designated its naval base at the tip of Cuba as a place to imprison some of its greatest enemies, about 800 people have been held at Guantanamo, and some 420 have been released back to their countries without charge. The oldest known suspect imprisoned there was 95-year-old Mohammed Sadiq from Afghanistan, who has been released. The youngest is Omar Khadr, a Canadian citizen who was just 16 years old when he was captured on the battlefield in Afghanistan in 2002.

A grainy video of a weeping Mr Khadr, who is still being held, emerged last week, providing an unprecedented glimpse into the harsh conditions at Guantanamo. Now 21, he was shown being interrogated for three days by Canadian intelligence agents after he had been tortured by sleep deprivation for three weeks. The longest portion of the video, an eight-minute segment, shows a sobbing Mr Khadr, burying his head in his hands and moaning "Help me, help me" as the agents look on.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

The footage, from a camera hidden behind a ventilation shaft, is the first video of a Guantanamo interrogation to become public. It was obtained under court order by Mr Khadr's Canadian lawyers, who want to bring him home. But neither the US nor the Canadian government wants to see him released. The US military accuses him of killing a soldier with a grenade and injuring another. However, efforts to persuade military courts that he is an "enemy combatant" were thrown out last year.

As for Mr Hamdan, he is "small fry, a grunt, and Bush knows it", said Marc Falkoff, a lawyer representing several other Yemeni detainees. "But the administration was never going to bring one of its high-profile detainees out first when nobody quite knows what's going to happen in this brand-new legal process."

The military commissions were created to try people designated "unlawful enemy combatants" after the Supreme Court issued a stinging rebuke to the Bush administration in June 2006 for tearing up the Geneva Conventions on the conduct of war and denying the most basic right of habeas corpus to prisoners. Despite the international clamour against Guantanamo, the US has charged only 20 of its prisoners, including Khalid Sheik Mohammed, who was tortured by "waterboarding" before arriving at the camp. One detainee, David Hicks, accepted a plea bargain in 2007, served nine months and is now free in his native Australia.

Mr Hamdan is suicidal and hears voices. He talks incessantly to himself and says that living alone inside a metal cell and never being allowed to see the sun "boils his mind". The isolation in which prisoners are held is blamed for driving them out of their minds with despair.

"He will shout at us; he will bang his fists on the table," said his military-appointed defence lawyer, Lieutenant Commander Brian Mizer. His attempts to stop the case until his client is granted more humane conditions, enabling him to prepare his defence, were rejected last week. The authorities complain that Mr Hamdan was far from a model inmate and that he routinely spat at guards and threw urine.

Guantanamo inmates face more time in isolation than many on Death Row in the US, say experts on American prison conditions. But the camp's spokeswoman, Commander Pauline Storum, claims that detainees are more psychologically robust than the ordinary US prison population, with fewer than 10 per cent mentally ill, compared with 50 per cent of the inmates in US jails. Nor is there is solitary confinement in Guantanamo, she adds, only "single-occupancy cells", and in any event prisoners communicate with each other by banging on their walls.

Lawyers handling some 80 war crimes cases are closely watching Mr Hamdan's trial. "The issue of mistreatment of prisoners, the miserable lives they live in these cells, will come up in every case," says Clive Stafford Smith, the British lawyer who is representing 35 detainees. In April, when Mr Hamdan appeared before the navy captain acting as his military judge, he announced that he would boycott his trial, crying out: "There is no such thing as justice here!" The judge told him to have faith in US law, declaring: "You have already been to the Supreme Court [in Washington]."

But the prisoner corrected him. While his lawyers had won a famous victory over the Bush administration in a case known as Hamdan vs Rumsfeld, he had not left Guantanamo. Instead, in more than six years of incarceration, he has made exactly two phone calls to his family back in Yemen, and received no visits. He has been punished for having a Snickers bar in his cell that his lawyers gave him and for stockpiling too many pairs of socks.

"Conditions are asphalt, excrement and worse," he wrote to his lawyers. "Why, why, why?"

The echoes of Hamdan vs Rumsfeld are still rumbling through the legal system. While Mr Cheney's adviser called efforts to apply the protections of the Geneva Conventions to prisoners "an abomination", the Supreme Court ruled emphatically that the administration had to abide by these laws in its war on terror. Even in wartime, the court said, the President was bound by laws and treaties, including the Geneva Conventions. The administration had no right to impose military commissions unilaterally, with rules made up in the White House.

So under pressure from President Bush, the 2006 Military Commissions Act was passed by Congress. This is what will finally be tested tomorrow. The Supreme Court has given Mr Hamdan the opportunity to challenge his status as an "enemy combatant" by presenting "reasonably available" evidence and witnesses to a panel of three commissioned officers, while being represented by a military officer.