Last year, Blair's government successfully fought off a legal challenge by relatives of several of the British residents in the US detention centre seeking to force London to press for their release.

The foreign office said Miliband and Jacqui Smith, the interior minister, "have decided to request the release from Guantanamo Bay and return to the UK" of the five men.

British residents

The men are Shaker Aamer, a Saudi national; Jamil el-Banna, who is Jordanian; Omar Deghayes, a Libyan; Binyam Mohamed from Ethiopia; and Abdennour Sameur, an Algerian.

The men had all been granted refugee status, indefinite leave or exceptional leave to remain in Britain before they were detained, a statement said.

"Finally there seems to be some light at the end of a very long tunnel"

Moazzam Begg, former Guantanamo detainee
A senior government source told Reuters news agency that the request was not at all about distancing Britain from the US.

"The reason for the change in approach is that the US are prepared to accept representations now about individuals who are not the nationals of those countries," the source said, adding that Washington had previously not been open to such overtures.

However, Moazzam Begg, a Briton who was detained at Guantanamo Bay for two years before being released in 2005, said he believed that the statement signalled a major change in the government's position.

"It's taken us five and a half years to get to this point," he said.

"There are children that have never seen their fathers. There are parents who died while their children have been locked away. But finally there seems to be some light at the end of a very long tunnel."

The foreign office said there may be security considerations when the men are returned to Britain and the government will "take all necessary measures to maintain national security".