Shaker Aamer, the last British resident held at Guantanamo Bay, is to be released, a British Government spokesman said.
The US government has notified the UK authorities that it now intends to return Mr Aamer to Britain.
"The Government has regularly raised Mr Aamer's case with the US authorities and we support President (Barack) Obama's commitment to closing the detention facility at Guantanamo Bay," the spokesman said.
"In terms of next steps, we understand that the US Government has notified Congress of this decision and once that notice period has been concluded, Mr Aamer will be returned to the UK."
Mr Aamer, 46, a Saudi national, was originally detained in Afghanistan in 2001.
He was subsequently transferred to Guantanamo Bay where he has been held without charge.
His release is expected to take place once the 30 day notice period set by the US authorities has expired.
Mr Aamer has been the subject of a long campaign to secure his release. Amnesty International UK Director Kate Allen said the news of his return was a "huge relief".
"In the past Mr Aamer has reportedly been at death's door during a hunger strike and his return to his family in Britain won't come a moment too soon," she said.
"The immediate focus should now be on providing medical and other support for Mr Aamer on his return to the UK, but let's not forget that his 13-year ordeal at Guantanamo has been an absolute travesty of justice."