A senior barrister, given special security clearance to act for suspected terrorists, is to resign in protest at the government's anti-terror laws.
Protests have been held against detentions
Ian MacDonald QC said he was stepping down after seven years "for reasons of conscience" because the "odious" laws were a "blot on the legal landscape".
It comes after the House of Lords ruled the indefinite detention of terrorist suspects was unlawful.
But the Law Lords have no power to strike out the anti-terrorism act.
Foreign Secretary Jack Straw has attacked the decision by Britain's highest court.
He said the right to life was the "most important liberty" and the government had a duty to protect people from terrorism.
The Law lords were "simply wrong" to imply the men were being held arbitrarily, he said.
'Contrary to justice'
Mr MacDonald is one of the Special Advocates given security clearance to represent detainees before the Special Immigration Appeals Commission (SIAC) - a secure court without jury, which tries terror suspects.
Writing in the Mail on Sunday he said the law was fundamentally flawed and "contrary to our deepest notions of justice".
"My role has been altered to provide a false legitimacy to indefinite detention without knowledge of the accusations being made and without any kind
of criminal charge or trial," he said.
He adds: "Such a law is an odious blot on our legal landscape and for reasons of conscience I feel that I must resign."
Mr Macdonald, who has been President of the Immigration Law Practitioners' Association since 1984, said that following the September 11 attacks, the SIAC's
role was expanded to hear appeals against the indefinite detention without trial of suspected international terrorists accused of links to al Qaeda who could not
He stayed on because he thought he could "make a difference", despite considering it "a wrong law brought in the wrong way to the wrong court".
He said such laws alienated Britain in the international arena, with the tone of the war against terrorism producing hatred and attacks on the Asian community.
"The solution to the perceived threat of international terrorism is not, in my view, to pass new laws which apply arbitrary arrest and indefinite detention without trial to every terrorist, British and foreign alike," he wrote.
The government had to opt out of the European Convention rights to a fair trial in order to bring in the anti-terrorism Act which was in response to the
September 11 attacks in New York and Washington.
Any foreign national suspected of links with terrorism can be detained or can opt to be deported.
But those detained cannot be deported if this would mean persecution in their homeland.