Born in Louisiana and raised in Saudi Arabia, Hamdi shot into prominence after his case prompted the US Supreme Court to rule recently that Americans held as "enemy combatants" must be allowed to contest their detentions.

According to court papers filed before a Virginia judge on Wednesday, government attorneys and Hamdi's attorneys "have been engaged in negotiations" that would allow Hamdi's release from custody.

Detained since his capture in Afghanistan two years ago, Hamdi would be sent back to Saudi Arabia when released, a Justice Department official said.

Officials said Hamdi after release would have to agree not to fight against the United States or assist those who would.

Court ruling

The Supreme Court on 28 June ruled that Hamdi should get a fair opportunity to rebut the government's reason for detaining him.

In the ruling, six of the nine Supreme Court justices found that US citizens held in the United States as enemy combatants have the right to be represented by attorneys and the right to challenge their indefinite detention.

Two justices went even further and said US citizens held in the United States as enemy combatants must either be charged with a crime and tried, or released.

Suspected of fighting on the side of the Taliban, Hamdi was at first taken to the US military base at Guantanamo Bay in Cuba, but was later moved to a US military jail when officials discovered he had been born in Louisiana.