He is being released along with four British detainees.

Australian Attorney General Philip Ruddock said Mr Habib, who had been accused of aiding the al-Qaeda network, was being repatriated at the government’s request and it was unlikely he would be charged under Australian laws.

“The United States considers Mr Habib to be an enemy combatant who has been detained in accordance with the laws of war,” Mr Ruddock told reporters.

Australia’s terrorism laws came into effect in July 2002.

“Those terrorism offences are not retrospective and therefore cannot apply to Mr Habib’s alleged activities and associations prior to his capture,” he said.

Mr Ruddock said Mr Habib remained of interest because of his former associations and activities.

The Sydney man could be back in Australia in a matter of days.

The Egyptian-born father-of-four was captured in Pakistan in the weeks after September 11, 2001, as the US led an offensive to drive the Taliban from power in Afghanistan.

He was taken to Egypt before being moved in May 2002 to Guantanamo Bay.

Mr Ruddock said the US believes Mr Habib had prior knowledge of the September 11 terror attacks.

“Mr Habib has acknowledged he spent time in Afghanistan, and others there at the time claimed he trained with al-Qaeda,” the Attorney General said.

It’s understood the Australian government has accepted responsibility for preventing Mr Habib from engaging in terrorist activities in the future.

Mr Ruddock said another Australian terror suspect also held at Guantanamo Bay, David Hicks, would not be repatriated because he faced three terrorism-related chargers under American law and would face trial by a military commission in early March.

But Mr Hicks’s lawyer Stephen Kenny said his client should also be allowed to come back to Australia.

“I think it’s now untenable that David Hicks should continue to be detained in Guantanamo Bay,” he said.

“The Australian government has consistently said he has committed no offence known to Australian law.”

Major Michael Mori, the US military lawyer representing Mr Hicks, said he was waiting to hear from Australian authorities whether they wanted him brought home.

“There was an agreement between the Australian government and the United States that any favourable condition that went to the British detainees, the Australian detainees would get,” he told Australia’s Channel Nine.

“The British detainees are not going to go though the commission process and they are all going to be returned to their home country. So I’m waiting for Mr Hicks to get the benefit of that agreement,” he said.