Guidance issued by Lord Chancellor Chris Grayling in relation to granting legal aid for immigration cases has been ruled "unlawful and too restrictive" by the High Court.
Quashing refusals of legal aid in six cases, a judge said the guidance "sets too high a threshold" and "produces unfairness" by denying publicly-funded legal advice to applicants in "exceptional cases".
Mr Justice Collins, sitting in London, said it was "a fundamental principle that anyone in the UK is subject to its laws and is entitled to their protection".
He said: "Thus there must be a fair and effective hearing available and the guidance, as the facts of some of the cases I have dealt with show, produces unfairness".
The judge quashed refusals by the director of legal aid casework, relying on the Lord Chancellor's guidance, to grant legal aid to six claimants.
All the cases concern the availability of legal aid in immigration cases under section 10 of the Legal Aid, Sentencing and Punishment of Offenders Act 2012 (LASPO), which deals with exceptional funding applications.
The judge said the cases involved EU nationals appealing against decisions that they should be deported following criminal convictions, an alleged victim of trafficking from Nigeria, and other cases involving the right to enter and remain in the UK.
The judge indicated that in some of the six cases legal aid should have been granted, but all of them must be reconsidered in the light of the court's judgment.
He said: "I have decided that the guidance in certain respects is indeed unlawful in that it is too restrictive and in other respects not in accordance with the law."
His ground-breaking decision will be seen by many as a blow to the Government's flagship LASPO legislation, introduced to reform the legal aid system in order to cut the legal aid bill by £350 million a year by 2015.
The Act made wide-ranging changes to the provision and scope of legal aid, including for immigration cases, and most of the reforms came into force on April 1 2013.
Campaign group Save Legal Aid has objected to the changes as a "false economy", saying: "We are extremely concerned that the cuts to legal aid will hurt the most vulnerable... and undermine the rule of law by making it more difficult for individuals to enforce their legal rights."
An important aspect of today's ruling was the judge's specific finding that the Lord Chancellor's guidance failed to recognise that Article 8 of the European Convention on Human Rights protecting "private and family life" applied "even in immigration cases" and legal aid might have to be provided to applicants wanting to raise Article 8 issues.
The judge said all six cases before him had an Article 8 claim, adding: "It is important in considering Article 8 to bear in mind that rights of family members, particularly children, must be taken into account.
"Indeed it has been made clear in the Supreme Court that the interests of the child are a primary consideration and Parliament recognised and gave effect to this in section 55 of the Borders, Citizenship and Immigration Act 2009 by requiring that the need to safeguard and promote the welfare of children who are in the United Kingdom be taken into account in an immigration decision."
The judge also warned: "Without access to properly accredited advisers, immigrants, who are in many cases vulnerable and unfamiliar with the English language, will be made the prey of unscrupulous so-called advisers.
"This is an aspect of the new situation following LASPO which has not been covered in the guidance and which is an important consideration when legal aid is refused on the basis that other services or assistance are available."
A Ministry of Justice spokesman said: "Legal aid is a vital part of our justice system but resources are not limitless and must be targeted at the cases that need it most.
"The system must be fair for those who use it and the taxpayers who pay for it.
"This Government brought forward legislation to remove legal aid for most immigration cases, except asylum claims, but agreed an exceptional funding scheme to make sure we also meet our international obligations.
"We are therefore disappointed with this judgment and are pursuing an appeal."
The judge gave lawyers acting for the director of legal aid casework and the Lord Chancellor permission to appeal against his ruling and suspended the effect of the orders he had made in the six cases for 28 days to give time for the appeals to be launched.