Yunus Rahmatullah was detained by British forces in 2004 in Iraq, where he said he was with a friend who was on a pilgrimage.
He was transferred into US custody in Afghanistan and held for 10 years without charge before being released this year, and currently lives in Pakistan.
Rahmatullah alleges that he was subjected to torture while in detention, including being beaten on the soles of his feet with rubber flex, being exposed to tear gas and being immersed upside down in water tanks.
But judge George Legatt said in his ruling that for a British court to refuse to hear a case on those grounds "would seem to me to be an abdication of its constitutional function".
More From This Section
The judgment, which was published by the British justice ministry, also concerns claims made by three Iraqi civilians of abuse by British soldiers in Iraq before they were handed over to US forces.
"It is now high time for the British government to abandon its attempts to evade judicial scrutiny of its conduct in operations involving the US in Iraq and Afghanistan, so that justice may finally be served," said Sapna Malik, Rahmatullah's lawyer.
British officials had pursued the same defence of claiming that the US involvement meant the case could not be heard by British courts.
The judgment in Abdul-Hakim Belhaj's favour said that "unless the English courts are able to exercise jurisdiction in this case, these very grave allegations against the executive will never be subjected to judicial investigation".