The Court of Appeal has found the process deciding those eligible for Employment and Support Allowance (ESA) disadvantages people with mental health problems, learning disabilities and autism.
The case centres on how evidence is gathered for the Work Capability Assessment (WCA). Under the current system, evidence from a professional such as a GP or social worker is expected to be provided by claimants themselves.
There is no obligation for the DWP to collect this evidence, even on behalf of the most vulnerable, apart from in some rare cases.
Gathering evidence can be very challenging for people with mental health problems, learning disabilities or autism, resulting in them being assessed as fit for work.
The original judgment, in May this year, was the result of a Judicial Review brought by two anonymous claimants with mental health problems.
The Department for Work and Pensions (DWP) immediately appealed against the judgment and the Judicial Review was put on hold. Now that the DWP has lost their appeal, the Judicial Review will continue.
A final judgment is expected next year unless the DWP decide to take the case to the Supreme Court.
The charities Rethink Mental Illness, Mind and the National Autistic Society intervened in the case to provide evidence based on the experiences of their members and supporters.
In a joint statement Rethink Mental Illness, Mind and the National Autistic Society said: "The judges in the original ruling independently confirmed what our members and supporters have been saying for years - the system is unfair for some of the most vulnerable people in our society and is failing the very people it is meant to be supporting.
"In light of today's ruling it would be irresponsible for the DWP to carry on using these flawed assessments as they are."
Key person cover also in plan
'Mental health affects everyone'
Get 10% off ticket
One in seven turn to alcohol