Judges have ruled that work capability assessments (WCA) conducted to decide eligibility for certain disability benefits discriminate against those with mental illness.
The highly controversial WCA has been regularly criticised for not taking into account claimants true problems.
This has been highlighted by around 40% of those claimants being turned down for Employment and Support Allowance (ESA) being successful on appeal.
The judicial review was brought to the Upper Tribunal by two claimants with mental health problems whose identities have been protected.
They argued that those claimants with mental health problems needed greater help and support to bring together the evidence supporting their claim.
The court agreed and ruled that those with with mental illness, autism and learning difficulties were at a substantial disadvantage.
According to the Public Law Project, the ruling was unusual in that it after ordering the Department for Work and Pensions (DWP) to take reasonable steps to address the disadvantages, it required the DWP to carry out an investigation and then return to court to explain what steps it proposes to take.
The claimants' solicitor and member of the Public Law Project Ravi Low-Beer said: "The ruling confirms what disabled people have been saying for years - that the Work Capability Assessment process is not fit for purpose.
"The court has considered the evidence and has endorsed the view of the experts and non governmental organisations that have repeatedly called for medical evidence to be sought and considered by the DWP at the early stages of a claim. It is up to all of us now to put pressure on the DWP to investigate - and then implement - real changes to the process without delay or prevarication, as the court has ordered.
"It is in everyone's interests that the DWP changes course - if they continue to rush people with mental health disabilities through the process as it stands, more ill people will be wrongly refused support, more ill people will suffer a deterioration in their mental health as they try to navigate the appeal system, and more public money will be wasted."
The DWP said it was planning to appeal the decision.
The decision was welcomed by the Trades Union Congress which said the government should now act on the ruling, rather than appeal it.
TUC General Secretary Frances O'Grady said: "Rather than waste time appealing against the decision and causing individuals yet more distress and anxiety, the Department for Work and Pensions should instead concentrate on improving its procedures.
"If work capability assessments are to be fair and no longer discriminate against people with a mental illness or learning disability, all the relevant medical evidence must be sourced before a decision is taken about whether someone is eligible for employment and support allowance.
"Changes must be made to the assessments now, otherwise anyone who struggles to collect together the necessary material to support their case will continue to be assessed incorrectly and wrongly denied the support they need," she added.