The Justice Department said on Wednesday that Yasir Isam Hamdi would be released and sent to Saudi Arabia under terms of an agreement.
His case prompted a Supreme Court ruling in June on the limits of presidential power in wartime.
Hamdi, who was detained at a US naval jail in Charleston, South Carolina, will be sent to Saudi Arabia under an agreement in which he renounces any claim to American citizenship, which he held because he was born in Louisiana in 1980.
Hamdi, 23, has been in US military custody since he was captured on the battlefield in Afghanistan in November 2001 and accused of fighting for the Taliban. Officials said he would be released within days.
The Justice Department said the US government, Hamdi and his lawyer had signed an agreement for the release.
"He's been in solitary confinement and couldn't stand it any more. Anything that would get him home in the short term to his family would be preferable to almost any other alternative"
This includes a pledge by Hamdi never to return to the United States and his acceptance that he will be restricted from travelling to Afghanistan, Iraq, Israel, Pakistan, Syria, the West Bank and Gaza. Hamdi is also obliged to notify Saudi officials if he ever plans to leave that country, according to people involved in the case.
"As we have repeatedly stated, the United States has no interest in detaining enemy combatants beyond the point that they pose a threat to the US and our allies," Justice
Department spokesman Mark Corallo said in a statement.
Corallo said the government had decided to release Hamdi "subject to strict conditions that ensure the interests of the United States and our national security."
Hamdi's lawyer, Frank Dunham, said his client had accepted a deal for release with strings attached rather than fighting in court despite his strong legal case because victory "wasn't
"But a loss could have him locked up for many, many, many more years. So we chose guaranteed, immediate release with restrictions over the vagaries of continued litigation," Dunham said.
Detainees are held under heavy
security and limited movement
"He's been in solitary confinement and couldn't stand it any more. Anything that would get him home in the short term to his family would be preferable to almost any other alternative."
Hamdi was born to Saudi parents on 26 September, 1980 in Baton Rouge, Louisiana, while his father worked in the oil business. His family moved back to Saudi Arabia when he was a toddler.
In January 2002 Hamdi was taken to the US naval base at Guantanamo Bay, Cuba, where hundreds of al-Qaida and Taliban suspects are imprisoned.
He was moved in April that year to a naval prison in Norfolk, Virginia, when US officials discovered he had been born in Louisiana. Hamdi later was moved to the Charleston jail, but no charges were ever brought.
Enemy combatant status
The United States designated him an "enemy combatant" - a status conferring few rights that has also been assigned to hundreds of non-Americans imprisoned at Guantanamo.
Another US citizen deemed an enemy combatant, former Chicago gang member Jose Padilla, remains in the Charleston jail.
Dunham sued in May 2002, challenging the legality of Hamdi's detention and arguing that the government had violated his constitutional right to due process by holding him indefinitely while denying him access to a lawyer or trial.
The Bush administration argued the president had the right during wartime to declare those who fight against the United States "enemy combatants" and restrict their access to the
On 28 June the Supreme Court ruled that US citizens held in America as enemy combatants have the right to lawyers and to challenge that designation and their indefinite detention.