KABUL, Afghanistan  Abdul Razzaq Hekmati was regarded here as a war hero, famous for his resistance to the Russian occupation in the 1980s and later for a daring prison break he organized for three opponents of the Taliban government in 1999.

But in 2003, Mr. Hekmati was arrested by American forces in southern Afghanistan when, senior Afghan officials here contend, he was falsely accused by his enemies of being a Taliban commander himself. For the next five years he was held at the American military base in Guantánamo Bay, Cuba, where he died of cancer on Dec. 30.

The fate of Mr. Hekmati, the first detainee to die of natural causes at Guantánamo, who fruitlessly recounted his story several times to American officials, demonstrates the enduring problems of the tribunals at Guantánamo, say Afghan officials and others who knew him.

Afghan officials, and some Americans, complain that detainees are effectively thwarted from calling witnesses in their defense, and that the Afghan government is never consulted on the detention cases, even when it may be able to help. Mr. Hekmati’s case, officials who knew him said, shows that sometimes the Americans do not seem to know whom they are holding. Meanwhile, detainees wait for years with no resolution to their cases.