The UK Home Office attempt to fast-track the deportation of foreign nationals who are refused permission to stay in Britain has been ruled unlawful.
The High Court ruling is the latest blow against successive governments over their policies seeking to target and harass migrants and asylum seekers.
The summary removals policy was introduced in 2007 but widened earlier in 2010.
The Court, echoing civil rights and migrant groups, said it meant that those affected had "little or no notice" of removal and were deprived of access to justice.
The UK Border Agency's general policy allows 72 hours notice of removal but this can be reduced to little or none at all for people in certain categories.
The case was brought by Medical Justice, an NGO which provides independent medical and legal advice to detainees in immigration removal centres.
It argued that this "exceptions policy" was being used to swoop late at night and escort people to flights leaving only a few hours later, depriving them of the ability to contact lawyers and launch a last-ditch challenge.
Judge Justice Silber rejected government claims that its policy was "sufficiently flexible" to ensure there were no human rights breaches, and that detainees were given "as much notice as possible".
"The policy is unlawful and must be quashed," the judge declared unequivocally.
The Home Office has been given permission to appeal against the decision, and is likely to choose to use taxpayers' money to do so - in spite of public spending cuts.
Judge Justice Silber said the case raises issues of public importance, including the constitutional right of access to justice.