A 48-year-old Afghan prisoner at Guantanamo Bay collapsed and died, apparently from natural causes, after exercising inside the jail, the U.S. military said Thursday.

Awal Gul fell in the shower Tuesday night after working out on an elliptical machine in Camp 6, a communal section of the Guantanamo reserved for well-behaved prisoners, said military spokesman Army Col. Scott Malcom. The prisoner was taken to the base hospital, where he later died.

Authorities planned to send his remains back to Afghanistan.

Gul is the seventh prisoner to die at the detention center since January 2002, when the U.S. began using the American Navy base in southeastern Cuba to hold captured detainees suspected of links to al-Qaida or the Taliban. Five other deaths were declared suicides. Another was from colon cancer.

Malcom said the death was still under investigation but that an autopsy completed Thursday appeared to indicate a heart attack or a pulmonary embolism as the cause. He said U.S. patient privacy laws prevented him from discussing any details about Gul's medical history.

As a prisoner, he was "among the most compliant" at Guantanamo, which now holds about 172 men, but he had not been cleared for release said Malcom, a spokesman in Miami, Florida, for the military command that oversees the detention center.

Gul had been held more than eight years without charge, and the military said in a statement that he was an "an admitted Taliban recruiter" who operated an al-Qaida guesthouse and had met several times with Osama bin Laden.

But Matthew Dodge, one of the lawyers who filed a writ of habeas corpus to force the government to release Gul, said the military's allegations were "outlandish" and that the government had slated him for indefinite detention because authorities had no evidence to support a prosecution.

Dodge said Gul had been part of a local force in the 1980s that was allied with the United States during the Soviet Union's occupation of Afghanistan and only later joined the Taliban because he had no choice.

Gul resigned from the Taliban more than a year before the attacks of Sept. 11, 2001, because he considered them "corrupt and abusive" Dodge said, and he was arrested by U.S. forces in December 2001 when he voluntarily traveled to meet with American military officials in Afghanistan.

"Mr. Gul was never an enemy of the United States in any way," said Dodge, a federal public defender in Atlanta, Georgia.

The prisoner had a large number of children and grandchildren who had been actively seeking his release, he said. "Mr. Gul was kind, philosophical, devout and hopeful to the end, in spite of all that our government has put him through," his lawyer said.

An investigation of Gul's death was being conducted by the Naval Criminal Investigative Service, which the military said was standard procedure. The same agency investigated the deaths of three prisoners in an apparent suicide in 2006.

Families of three men sued the government, alleging a cover-up in the 2006 deaths. The case was dismissed in federal court, but the men's relatives still have doubts about the adequacy of the investigation and plan to appeal, said their attorney, Pardiss Kebriaei of the New York-based Center for Constitutional Rights.

As for Gul, "We would call for a timely and transparent and meaningful investigation, which from our point of view has not been done in the case of any deaths so far at Guantanamo," Kebriaei said.

(This version CORRECTS spelling of exercise in headline)