The Government's fast track appeal system for processing asylum applications has been declared unlawful by the High Court.
A judge ruled the system, which has been in use for a decade to speed up the processing of asylum seeker claims, is "structurally unfair".
Mr Justice Nicol, sitting in London, said the system must be quashed but put a stay on his order taking effect to give the Lord Chancellor and Home Secretary time to appeal his decision to the Court of Appeal.
The ruling is a groundbreaking victory for the charity Detention Action, set up in 1993 to support and campaign on behalf of individuals held in immigration detention.
The group states: "Many asylum seekers on the detained fast track are confused and distressed.
"Held in conditions equivalent to a high-security prison, they struggle to understand a complex procedure in an unfamiliar and hostile environment in which clear information is not always easily available.
"Such circumstances pose considerable obstacles to asylum seekers' ability to engage effectively with the asylum process.
"Time is always against the asylum seeker on the detained fast track."
The judge said in his ruling: "What seems to me to make the fast track rules structurally unfair is the serious procedural disadvantage which comes from the abbreviated timetable and curtailed case management powers, together with the imposition of this disadvantage on the (asylum seeker)..."
Although the judge declared the Lord Chancellor had acted outside his powers in imposing the fast track appeal rules, he refused a plea by Detention Action for him to quash the system straight away.
The judge said: "In my judgment it is right that I should grant a stay pending an appeal (by the Lord Chancellor) to the Court of Appeal."
Charlotte Kilroy, appearing for Detention Action, submitted to the judge that he had no power to impose a stay as that would allow the Government to continue operating what he had just declared to be an unlawful system.
That meant asylum seeker cases in the fast track would now have their applications processed unfairly.
Ms Kilroy said: "They may be returned to countries from which they have come in breach of the UK's obligations under the Refugee Convention and the European Convention on Human Rights in circumstances where the highest standards of fairness apply."
But the judge refused her permission to appeal over the issue. Detention Action can still ask the Court of Appeal itself to lift the stay.
Detention Action Director Jerome Phelps said: "We are pleased that the fast track appeals process has been found not just unlawful but ultra vires.
"But we are shocked and disappointed that a stay has been granted, given that this is an area of law requiring the highest standards of justice and fairness.
"By granting the stay, it appears that the judge considers that the severe potential consequences to asylum-seekers, including removal in breach of the Refugee Convention, are outweighed by the inconvenience to the Home Office and Lord Chancellor of suspending the process."
Detention Action says the judgment would mean that the Home Office would no longer be able to assign asylum-seekers to an accelerated appeals process in detention..
"Asylum-seekers would therefore no longer be detained throughout the asylum process simply for claiming asylum.
"But until the appeal is heard, asylum-seekers will continue to face an appeals system that has been found unlawful."
A Government spokesman said: "We are disappointed by this judgment and will be appealing.
"Detained fast-track is an important part of our immigration system.
"It contributes significantly to the speed and effectiveness with which asylum cases are processed - including swiftly removing those found not to be in need of protection - and saves the taxpayer money."
Refugee Council chief executive Maurice Wren said: "Today the courts have recognised the detained fast track appeals system for what it is: fundamentally unfair and a grotesque caricature of British justice.
"This is an important step forward in the battle to stop Government officials arbitrarily and shamefully imprisoning some of the world's most desperate people who have simply asked for our protection."
Oliver Sanders, for the Lord Chancellor, persuaded the judge not to impose an immediate stay, saying that it would lead to "a considerable increase in detention costs" with knock-on effects for first-tier and upper immigration tribunals.
Ms Kilroy said not to impose an immediate stay would "sacrifice fairness on the altar of some temporary inconvenience".
Campaign group Freedom From Torture said 240 referrals had been received from potential torture survivors routed into the fast track system last year. Many were fast-tracked despite disclosing evidence of torture at their asylum screening interview.
The system was "fundamentally flawed and dangerous" and risked re-traumatising victims.