The Law Lords have been asked to rule if Britain can use evidence against terror suspects that may have been obtained by torture in other countries.
The men were detained under the 2001 Anti-Terrorism Act
The Court of Appeal ruled last year that such evidence was usable if UK authorities had no involvement.
But 10 terror suspects being held without charge, backed by human rights groups, are challenging that ruling.
They argue such evidence obtained in US detention camps should be excluded. The Home Office would not comment.
Ben Emmerson QC, representing the detainees, told a panel of seven Law Lords that the case raised the dilemma of reconciling the protection of national security and the protection of human rights.
He said permitting the use of evidence obtained under torture was "an affront to the public conscience".
The central issue, he said, was whether and how the courts ensured the judicial process was not compromised by evidence "obtained by other states in breach of the universal prohibition on torture".
Using such evidence gives an incentive to the torturer "by making the act of torture worthwhile", he added.
Last August, the Court of Appeal said the government had acted legally by detaining the 10 terror suspects without charge.
It said the British government had no obligation to investigate how such evidence had been obtained.
The men, who were held at Belmarsh high security prison in London, had challenged a decision made by the Special Immigration Appeals Commission that the government was right to hold them.
They were detained under the 2001 Anti-Terrorism and Security Act, which came into force after the 11 September attacks on the US.
It is thought that much of the secret evidence against them came from intelligence services in Algeria, Morocco and Jordan, where torture is understood to take place.
Lawyers for the men will argue in the Lords that the Appeal Court ruling was in breach of Article 3 of the European Convention on Human Rights prohibiting torture or degrading treatment.
Lord Carlile, a QC and Liberal Democrat peer appointed by the government to review its anti-terrorism legislation, said he felt the use of evidence possibly obtained by torture should be "proportional and not fixed".
However, he added: "I don't think it is hypocritical to take action which is likely to have the effect of saving possibly dozens or hundreds of lives."
Shami Chakrabarti, director of Liberty, said the war against terrorism was not just operational but was also a "battle of ideas".
"If the democracies of the world don't stand up against torture, what will they say to the people who tortured Ken Bigley and what will they say to Saddam Hussein and other dictators around the world?"
And Amnesty International UK Director Kate Allen said information provided under torture was often unreliable.
War on terror
Campaigners have staged a demonstration outside Parliament and signed a statement calling for the UK to respect human rights.
A spokeswoman for the Home Office would not comment on the case, but added: "We will consider the judgment once it has been delivered."
Last week, the Lord Chancellor said the war on terror did not allow Britain to turn a blind eye to torture.
Ministers are seeking guarantees from countries including Jordan, Egypt and Algeria that suspects would not be tortured or killed if they were extradited from the UK.
The hearing is likely to continue for most of the week but a result is not expected for weeks, or even months.