The United States government said it could not find the men that Guantánamo detainee Abdullah Mujahid believes could help set him free. The Guardian found them in three days.

Two years ago the American military invited Mr Mujahid, a former Afghan police commander accused of plotting against the US, to prove his innocence before a special military tribunal.

As was his right, Mr Mujahid called four witnesses from Afghanistan.

But months later the tribunal president returned with bad news: the witnesses could not be found. Mr Mujahid's hopes sank and he was returned to the wire-mesh cell where he remains today.

The Guardian's search for Mr Mujahid's witnesses proved successful within three days. One was working for President Hamid Karzai, another was teaching at a leading American college and the third was living in Kabul. The fourth was dead.

Each witness said he had never been approached by the Americans to testify in Mr Mujahid's hearing.

The case illustrates the flaws that have discredited Guantánamo-style justice and which led the US supreme court to declare such trials illegal on Thursday in a major rebuke to the Bush administration.

Mr Mujahid is one of 380 Guantánamo detainees whose cases were reviewed at "combatant-status review tribunals" in 2004 and 2005. The tribunals were hastily set up following a court ruling that the prisoners, having been denied all normal legal rights, should be allowed to prove their innocence. Ten of the hearings proceeded to full trials, including that of Osama bin Laden's aide, Salim Ahmed Hamdan, who brought the successful supreme court appeal.

But by the time the review tribunals ended last year the US government had located just a handful of the requested witnesses. None was brought from overseas to testify. The military lawyers simply said they were "non-contactable".

That was not entirely true.

Abdullah Mujahid was originally identified by Washington-based reporters from the Boston Globe after trawling through pages of testimony from the military trials. American forces arrested Mr Mujahid in the southern Afghan city of Gardez in mid-2003, claiming that he had been fired as police chief on suspicion of "collusion with anti-government forces", according to official documents. Later, they alleged, he attacked US forces in retaliation.

In the military tribunal Mr Mujahid protested his innocence. He enjoyed good relations with American soldiers and had been promoted, not fired, he said.

The three living witnesses he requested were easily located with a telephone, an internet connection and a few days' work.

Shahzada Massoud was at the presidential palace, where he advises Mr Karzai on tribal affairs. Gul Haider, a former defence ministry official, was found through the local government in Gardez.

The interior ministry gave an email address for the former minister, Ahmed Ali Jalali, although he could as easily have been found on the internet - he teaches at the National Defence University in Washington DC.

The witnesses corroborated Mr Mujahid's story with some qualifications. Mr Jalali, the former interior minister, said Mr Mujahid had been fired over allegations of corruption and bullying - not for attacking the government.

Mr Haider, the former defence official, said Mr Mujahid had contributed 30 soldiers to a major operation against al-Qaida in March 2002. "He is completely innocent," he said.

In Gardez, Haji Muhammad Hasan, 65, keeps a stack of Red Cross letters as the only proof of his son's whereabouts. "I feel completely helpless," he said in despair. Beside him the detainee's shy sons - aged three, four and five - waited for news of a father they could hardly recall.