The Government has lost the latest round of a legal battle over its back-to-work schemes.
Three Court of Appeal judges in London have dismissed its challenge against an earlier High Court ruling.
The Government had appealed in a bid to prevent thousands of individuals who had jobseeker payments stopped from clawing back millions of pounds in lost benefits.
Friday's decision is the latest in litigation over back-to-work schemes following a Supreme Court ruling in October 2013.
Five justices at the highest court in the land ruled, in what became known as the Poundland case, that the Government's flagship back-to-work schemes were flawed because sufficient information had not been given to claimants to enable them to make representations before benefits were stopped.
The Government brought in emergency retrospective legislation, the Jobseekers (Back to Work Schemes) Act 2013, to "protect the public purse" and stop the payouts.
It was argued the sanctions had been justified and the claimants would be receiving "undeserved windfall payments".
But a High Court judge, Mrs Justice Lang, declared the 2013 Act "incompatible" with Article 6 of the European Convention on Human Rights, which protects the right to fair hearings.
The Department for Work and Pensions (DWP) decided not to make any payouts pending the Court of Appeal bid to overturn Mrs Justice Lang's decision.
Appeal judges ruled on Friday that when Parliament enacted the 2013 Act in order to retrospectively "validate those sanctions" it was "successful in doing so as a matter of English law".
But Lord Justice Underhill, announcing the ruling of the court, said: "But we have also held - upholding the decision of the High Court - that in the cases of those claimants who had already appealed against their sanctions the Act was incompatible with their rights under the European Convention on Human Rights."
He added: "Under the Human Rights Act that 'declaration of incompatibility' does not mean that the 2013 Act ceases to be effective as regards those claimants; it is up to the Government, subject to any further appeal, to decide what action to take in response."
At a hearing in November, James Eadie QC, for the Work and Pensions Secretary, told Lord Justice Underhill, Lord Justice Burnett and Dame Janet Smith that the 2013 Act was necessary to prevent payments being made to individuals who had refused "without good reason" to take part in back-to-work schemes and accordingly been sanctioned.
The QC said, if the appeal failed, "up to £130 million might need to be found from the welfare budget at a time of austerity".
Mr Eadie said the High Court decision was "wrong in law" and Mrs Justice Lang had "failed to afford the necessary constitutional respect to Parliament and the parliamentary process".
The 2013 Act was primary legislation dealing with social security policy debated and passed in Parliament and accordingly entitled to constitutional respect.
The original Supreme Court ruling was won by university graduate Cait Reilly, from Birmingham, who challenged having to work without pay at a local Poundland discount store.
Ms Reilly and unemployed HGV driver Jamieson Wilson, from Nottingham, won the original ruling that regulations governing the back-to-work schemes were flawed.
Mr Wilson objected to doing unpaid work cleaning furniture, and as a result was stripped of his Jobseeker's Allowance for six months.
Ms Reilly was joined in the battle against the subsequent emergency legislation by Daniel Hewstone, who has received jobseeker's benefits since 2008.
The court was told that Mr Hewstone stopped attending the DWP's Work Programme because he could not afford to wait for his travel expenses to be reimbursed and felt that the menial work offered did not enhance his skills or improve his prospect of finding long-term work.
Padraig Hughes, of Public Interest Lawyers, said: " The Court of Appeal has now confirmed what the High Court made clear in 2014 - that the Government's cynical attempt to introduce retrospective legislation, after it had lost its previous case in the Court of Appeal, is unlawful and a breach of the Human Rights Act.
"It is yet a further example of the reckless approach this Government continues to take towards the constitution and the rule of law."
A DWP spokesman said: " It's only right that jobseekers do all they can to find work while claiming benefits. We are considering the judgment."