Updated

A federal judge ordered the release of five Algerian terror suspects held without charges at Guantanamo Bay prison for almost seven years.

In the first civilian court ruling for terror suspects challenging their detention, U.S. District Judge Richard J. Leon said Thursday that the five men could not be held indefinitely as enemy combatants.

One of the men to be released is Lakhdar Boumediene, whose landmark Supreme Court case last summer gave the Guantanamo detainees the right to challenge their imprisonment.

Leon ruled that the U.S. government failed to prove that five of the six Algerians held at Guantanamo Bay since Jan. 20, 2002, were enemy combatants headed to Afghanistan to fight against the United States.

The sixth detainee — Belkacem Bensayah — was ordered held because there was sufficient evidence proving he has ties to Al Qaeda, the judge ruled.

The feds' claim relied on one source, and the government didn't provide enough evidence to prove that source's reliability, according to the decision.

A senior Department of Defense official told FOX News that the government's case was hampered because the CIA would not hand over the classified information it had obtained in interrogating the 6 suspects.

That refusal forced the Justice Department to rely on the testimony of only one person, the official said.

The Department of Justice plans to appeal the Washington, D.C., court's ruling, the source told FOX. If the decision is upheld, the government will make arrangements to transfer the five men back to Algeria or Bosnia, according to a Defense spokesman on detainee affairs.

The government had accused all six of the men of planning to travel to Afghanistan to join Al Qaeda.

The government initially detained Boumediene and the other five men on suspicion of plotting to bomb the U.S. Embassy in Sarajevo in October 2001. They were transferred to Guantanamo in January 2002.

The Justice Department has since backed off embassy bombing accusations, but maintain the six men were caught and detained before they could join terrorists' global jihad against the United States and its allies.

The Bush administration says it was right to be proactive against threats like those allegedly posed by the Algerians, especially in the months immediately following the terror attacks on New York and Washington on Sept. 11, 2001.

FOX News' Shannon Bream, Jennifer Griffin and The Associated Press contributed to this report.