A delay in paying welfare benefits to two disabled people was "unlawful", the High Court has ruled.
Delays of at least nine months for Personal Independence Payments (PIPs) for these "most vulnerable" of people were unreasonable, a judge ruled.
But the court ruled the pair's human rights were not breached which means they are not entitled to compensation.
The pair's lawyers said the ruling showed "clear failings" in the system but ministers said it was improving.
There are currently 78,700 people waiting to hear if they can claim PIP, of whom 3,200 have waited more than a year to have their claims processed, and 22,800 have waited more than 20 weeks.
The claimants, known only as Ms C and Mr W, said the delays meant they struggled to pay for food and fuel, and this caused their health to decline.
Ms C, from Kent, who has been diagnosed with ME and suffers from severe depression and other health problems, waited from September 2013 to October 2014 to have her eligibility assessed. Mr W waited from February to December 2014.
Their lawyers said they had a right to the benefits and should have received them within a "reasonable time".
By Nikki Fox, BBC disability news correspondent
No-one is denying that the waiting times for a decision, even an assessment for PIP, has for many people taken far too long. Iain Duncan Smith himself admitted in June last year that the delays were unacceptable.
But now the High Court has gone as far as to say these long delays are unlawful. What, if any, impact will this have on the thousands of people still lost in the system?
Justice Patterson refused to say this could have wider implications apart from for the two anonymous claimants. Their solicitors hope this will open the door to further discussion with the DWP, so those thousands who have suffered financial hardship could get some kind of compensation.
But there may be many more legal challenges before that happens. However, for now, it does put pressure on the government over its plans to roll out PIP to 1.5 million disabled people across the UK.
There is a minimum accepted processing time of two months for each claim, and that can be extended if appointments for assessment are missed, as was the case with one of the claimants.
The judge ruled that the delay - in both cases - of at least nine months over this processing time was "not only unacceptable, as conceded by the defendant, but was unlawful".
The judge said both cases suffered significant disabilities and therefore called for "expeditious consideration" and that the DWP's actions regarding these cases was "unreasonable in the sense of being irrational".
The pair had argued their claim should be a treated as a test case but the judge rejected this.
In her ruling, Justice Patterson said that due to the "considerable variations in individual circumstances", it would be "inappropriate" to grant a declaration in wider terms covering other cases of late payments.
The court heard that the two claimants had asked Mrs Justice Patterson to declare that Work and Pensions Secretary Iain Duncan Smith breached common law and human rights duties to make payments within a reasonable time.
This breach was caused, they said, because of the magnitude of the delay but Justice Patterson ruled this was not the case.
The National Audit Office has said the Department for Work and Pensions (DWP) had not left enough time to fully test the government's new benefit system before it took on new claims in June 2013.
And said in June 2014, then Public Accounts Committee chairwoman, Labour MP Margaret Hodge, said that the implementation of Pips had been "nothing short of a fiasco".
The DWP had agreed the delays were unacceptable but argued they were not unlawful, and said more than 800 extra staff were assigned to work on PIPs after problems emerged.
Anne-Marie Irwin, the public lawyer leading the cases, said it was a "significant legal judgement".
She added: "Today's decision sends a clear message that the unacceptable delays faced by many people, may also be unlawful.
"Attention must now turn to rethinking the planned wider rollout in October until reassurances can be provided that the delays seen in the past are not repeated in the future."
And she also said it was vital that the "thousands" of others who have experienced delays are not forgotten.
The DWP said successful PIP claims were always backdated.
Minister for Disabled People Justin Tomlinson said he was pleased the court had recognised the "huge progress" made by the DWP.
He added: "The average new Pip claimant now waits only seven weeks for an assessment.
"The court has rightly dismissed the claimants' absurd suggestion that their human rights had been breached. As a result, they are not entitled to damages."
A spokeswoman for Prime Minister David Cameron acknowledged there were problems in the original roll out of PIPs.
He fully supports the approach of the DWP, which is looking at where it could learn lessons, she added.
Labour's shadow minister for disabled people, Kate Green, said the ruling was "a damning indictment on the government's failure to get a grip of benefit delays" which had forced "thousands of people to rely on food banks to survive".
PIPs are benefit payments to help people aged 16-64 with "some of the extra costs caused by long-term ill-health or a disability".
They are available to employed and unemployed people, and claimants can receive £21.80 to £139.75 a week, depending on how their condition affects them.
This is determined by an assessment, and claimants are regularly reassessed, but government figures show more than 3,000 have been waiting for more than a year for their claims to be processed.
From April 2013, PIPs began replacing Disability Living Allowance.
This process is ongoing and the government says everyone who needs to switch to PIPs should have been contacted by late 2017.
Elliot Dunster, of the disability charity Scope, said the judgement "demonstrates the importance of extra costs payments to disabled people".
"Life costs more if you are disabled. Extra costs can make it extremely hard for disabled people to pay the bills. Every day without them is another day unable to afford the essentials in life."
Richard Kramer, from the national deafblind charity Sense, said these cases were "a reminder that there is some way to go before the system can be regarded as fit for purpose and customer-facing for all disabled people".
Gillian Guy, chief executive of Citizens Advice, said delays to PIP assessments are "unacceptably common" and that the system was not fit for purpose.
"PIP is a key part of our welfare system. It defies common decency that some disabled people are waiting months on end just to find out if they're entitled to the necessary support."