Appeals court judges deciding whether to release a Guantanamo Bay detainee asked Friday: If once an al-Qaida member, always an al-Qaida member?

The Obama administration has appealed an order for the release of Mohamedou Ould Salahi, who has been accused of helping recruit Sept. 11 hijackers. A lower court judge said Salahi should be freed because he was abused by interrogators at the Naval-run prison in Cuba and later retracted his confession to arranging travel for two hijackers.

Salahi admits he joined al-Qaida in the early 1990s to fight communists in Afghanistan. But he says he stopped fighting for the organization before it turned against the United States.

The 9/11 commission report described Salahi as a significant al-Qaida operative who instructed hijackers how to reach Afghanistan to train for jihad. In court filings, the Justice Department says in October 1999, Salahi encouraged Ramzi bin al Shibh, Marwan al Shehhi and Ziad Jarrah to join. Al Shehhi and Jarrah became two of the hijackers and Bin al Shibh helped coordinate the 9/11 plot.

Salahi was arrested in his home country of Mauritania 18 days after the terrorist attacks of Sept. 11, 2001. His lawyers say he was sent to Jordan and abused for eight months before being moved to Bagram Air Field in Afghanistan and finally to Guantanamo in 2002.

U.S. District Judge James Robertson ruled this spring that the evidence against Salahi was "tainted by coercion and mistreatment" and based on classified material that could not support a criminal prosecution.

Salahi's treatment was documented in a 2009 report by the Senate Armed Services Committee that investigated allegations of detainee abuse at Guantanamo. It described how in July 2003, Salahi was isolated, questioned by a masked interrogator, forced to stand for long periods of time, threatened with death and torture and exposed to flashing strobe lights and the blaring metal song "Bodies" by Drowning Pool.

The Justice Department acknowledges that much of the evidence against Salahi is tainted and said instead that it is relying on his statements some time after the abuse ended and other evidence against him. Justice Department attorney August Flentje told a three-judge panel with the U.S. Court of Appeals in Washington Friday that Salahi's pledge to support al-Qaida and his continuing association with other members mean he remained part of the terrorist organization.

But Flentje faced skepticism, particularly from Judge David Tatel, who questioned whether Salahi's swearing of an Islamic oath, or "bayat," to al-Qaida 10 years before the Sept. 11 attacks is evidence that he engaged in hostilities against the United States.

"When he swore bayat, the United States and al-Qaida had a common goal," said Tatel, who was appointed by President Bill Clinton. "Both the United States and al-Qaida were opposing a communist government of Afghanistan."

Flentje argued that Salahi's continued association with al-Qaida members proved he didn't leave the group. Salahi admits that he stayed in touch with friends who continued to support al-Qaida, including his brother-in-law, who was a high-ranking spiritual adviser to al-Qaida leader Osama bin Laden.

But David Sentelle, chief judge of the court and an appointee of Ronald Reagan, said it wouldn't be expected that Salahi would completely sever ties with al-Qaida. "That's going to get him killed," Sentelle said.

Still, Tatel suggested that it might be appropriate to send Salahi's case back to the lower court considering subsequent decisions in other Guantanamo Bay cases that have set new legal standards since Robertson ruled in March. Robertson has since retired so that would mean reassigning the case to a new judge.