Abu Qatada is ready to end his 11-year-long stay in Britain and return to Jordan to face trial.
In a development that would mark a victory for Home Secretary Theresa May, whose fight to have him deported has been thwarted at every turn, Qatada's lawyer told the Special Immigration Appeals Commission (Siac) that his client could voluntarily leave Britain.
Voluntary repatriation would hinge on Jordan ratifying a treaty with the UK banning the use of evidence obtained under torture in court.
Jordon's information minister Mohamed al-Momani said he expect his government would sign up.
Qatada, once branded Osama bin Laden's right-hand man in Europe, has defied eight years of attempts by British governments to deport him.
It is thought his U-turn may have been taken because the new treaty would mean he was less likely to win another appeal against deportation.
Edward Fitzgerald QC said: "There comes a point when detention goes on for too long.
"That treaty is clearly designed to meet the requirements laid down by Mr Justice Mitting as to evidence admissible at a retrial, if there is a retrial," he said.
"If and when the Jordanian parliament ratifies the treaty he will voluntarily return to Jordan."
Qatada has never been charged with an offence in the UK but has spent years in detention or under house arrest.
The 53 year-old is on remand at a high-security jail for allegedly breaching his bail conditions.
He is accused of spreading extremist ideas which inspired the 9/11 Twin Tower terrorists.
Security minister James Brokenshire said: "The home secretary's focus remains on seeing Abu Qatada returned to Jordan at the earliest opportunity. We continue to pursue this case before the courts and to work with the Jordanian government to achieve this."
Shadow home secretary Yvette Cooper said: "This could be very good news if it means Abu Qatada returns to Jordan as soon as possible - as we all agree he should stand fair trial there so justice can be done.
"Abu Qatada should have made this decision a long time ago as this legal process has dragged on far too long. We will watch the next steps closely until he departs, but I hope this saga can now be brought to an end."