The nine are among 11 foreign men held under the Anti Terrorism, Crime and Security Act enacted after the 11 September 2001 attacks on the United States.
In order to push through the legislation, Britain had to declare an emergency and suspend parts of the European Convention on Human Rights, the only country to do so.
On Monday, nine senior judges in the House of Lords will decide whether this was legal.
The sitting follows a demonstration by hundreds of human rights campaigners on Sunday outside London's Belmarsh high security jail where some of the detainees are held.
Illegitimate and discriminatory
Critics have described the laws as illegitimate because detainees cannot see secret evidence, and discriminatory because the powers apply only to foreigners.
"If there is a case against these men, it should be brought to court in the traditional British manner for a jury to decide and the men should be allowed to be legally represented to put their case," a spokesman for rights group Liberty said.
Under the emergency law, the authorities must show only that they have "reasonable grounds to suspect" the detainees have links to terrorism.
They can be held indefinitely for renewable six-month periods or opt to return to their home countries, a choice that will expose the mainly Arab political exiles to torture and maybe even the death penalty.
The nine men, who have not been named, are seeking to overturn a Court of Appeal ruling that backed the government's powers.
The government says it needs the emergency laws to fight terrorism.
British media reported that Attorney-General Lord Goldsmith would head the government's legal team, reflecting the importance of the case.