Yunus Rahmatullah, 30, was captured in Iraq in 2004 by British forces which then handed him to US authorities. He was later transferred to Afghanistan's Bagram jail where he has been held without charge ever since.
The Supreme Court said on Wednesday that it had dismissed appeals by Rahmatullah and by legal charity Reprieve on the grounds that the British government was unable to force his return from US custody.
It said "the response by the United States was sufficient to demonstrate that the UK could not secure his release".
Britain's Court of Appeal ruled in December that Rahmatullah's detention violated the ancient British law of habeas corpus - Latin for "you may have the body" - which forces authorities to bring a prisoner to court or explain their absence.
Following that decision the British Foreign Office then wrote to the United States demanding his return.
According to the Supreme Court, US authorities decided in June 2010 that Rahmatullah was not an enduring security threat.
However, they have refused to hand him over to Britain, and said that since they had already had a request from the Pakistani government they would prefer to deal directly with Islamabad.
The Court of Appeal in February then withdrew its order that he should be released.
Rahmatullah said in his appeal that the British government should have tried harder to get the US to release him, but the Supreme Court rejected his arguments by a majority of five judges to two.
The Supreme Court however also unanimously threw out an appeal by the British government against the initial habeas corpus ruling.
Rahmatullah's lawyer said he was disappointed by the ruling on his detention.
"Sadly, despite the fact that in international law Rahmatullah remains a British detainee and the United States does not consider him a security threat, our client remains in detention at Bagram," Jamie Beagent said.
COMMENTS (3)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
That's justice for you .................
National of one country (Pakistan) captured in second country(Iraq) by a third country (UK) and handed over to the fourth country (USA) who imprisoned him in a fifth country (Afghnistan))
We are living in a truly globalized world !
"Following that decision the British Foreign Office then wrote to the United States demanding his return." Oh please. Try "asked nicely."