The US 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 US military invited Mr Mujahid, a former Afghan police commander accused of plotting against the United States, 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 searched for Mr Mujahid's witnesses and found them within three days. One was working for President Hamid Karzai. Another was teaching at a leading American college. The third was living in Kabul. The fourth, it turned out, was dead. Each witness said he had never been approached by the Americans to testify in Mr Mujahid's hearing.

The case illustrates the egregious 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 thousands of pages of testimony from the controversial military trials. US forces arrested Mr Mujahid in the southern Afghan city of Gardez in mid-2003, claiming he had been fired as police chief due to 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 been found on the internet - he teaches at the National Defence University in Washington DC.

The witnesses largely 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.

Other Afghans agreed. General Ali Shah Paktiawal, Interpol director of the Afghan national police, said: "Some people have given false information about him and that's why this problem has come up."

Their testimonies do not necessarily exonerate Mr Mujahid but at the very least raise serious questions about the case against him. An Afghan government delegation that recently visited Guantánamo estimated that half of the 94 Afghan detainees were not guilty of serious crimes and should be released. They did not release any names.

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.

Lies and old rivalries had sent many innocent Afghans to Guantánamo, said Taj Muhammad Wardak, a former governor of Paktiya. "You can investigate these people here. There is no need to send them to Guantánamo," he said. "It is a great sadness between our countries that will last for many years."