Hilal Abdul-Razzaq Ali al-Jedda, a father of four with both British and Iraqi citizenship, has been held since late 2004 and argued his human rights had been breached.
But the Court of Appeal in London ruled on Wednesday that the British forces' policy of internment for terrorism suspects was lawful under a United Nations Security Council mandate.
Lord Justice Henry Brooke said: "The issue is... [whether] Mr al-Jedda should be permitted access to a court of law where he could answer a charge against him and test the evidence against him before an independent judicial tribunal.
"I am satisfied that he has no such entitlement."
He said al-Jedda was "not being arbitrarily detained in a legal black hole, unlike the detainees in Guantanamo Bay in the autumn of 2002" and noted he had been able to challenge the legality of his detention through the British courts.
Britain's Defence Ministry welcomed the judgment, which upheld a High Court ruling from last August.
"The power to detain is not taken lightly. It is used sparingly and only as a last resort," a ministry statement said.
"Detainees are held in accordance with Geneva Convention principles and Iraqi law. There are stringent review procedures to ensure that detainees are released as soon as they cease being an imperative threat to security."
Al-Jedda's lawyers argued he should be allowed to return to his home in Britain, saying the detention breached his right under the European Convention on Human Rights not to be deprived of his liberty, except in accordance with due legal process.
Al-Jedda has said he took his children to Baghdad in 2004 to meet his new wife and denies being a member of a terrorist group.
He was originally arrested by US forces and then handed over to British troops.
The ministry says he is suspected of belonging to a terrorist group and of involvement in the fighting in Iraq.
It says it provided evidence to support this view to the court.