A graduate who was forced to work at Poundland for free has won an appeal, in a blow for the Government's back-to-work schemes.
Cait Reilly, 24, from Birmingham, had argued that being made to work in the discount shop for nothing while she looked for a permanent job was illegal.
Jamieson Wilson, 40, an unemployed lorry driver from Nottingham who was stripped of jobseeker's allowance for refusing an unpaid cleaning role, also won his legal challenge.
Lord Justice Pill, Lady Justice Black and Sir Stanley Burnton, sitting in London, ruled that the regulations behind most of the back-to-work schemes were unlawful and quashed them.
The pair's solicitors claimed the ruling meant anyone docked jobseeker's allowance for not complying with the schemes could demand the money back.
The Department of Work and Pensions (DWP) has vowed not to repay anyone who had not been seriously trying to find work and said it was looking at "options" to avoid paying out.
Miss Reilly was forced to leave her voluntary post at a museum to work unpaid at Poundland in Kings Heath, Birmingham, in November (Xetra: A0Z24E - news) 2011 under a scheme known as the "sector-based work academy".
She was told she would lose jobseeker's allowance if she refused and spent two weeks stacking shelves and cleaning floors.
Mr Wilson, a qualified mechanic, was told that he had to work unpaid, cleaning furniture for 30 hours a week for six months, under a scheme called the community action programme.
He objected to doing unpaid work that would not help him re-enter the jobs market and refused, leading to him losing jobseeker's allowance for six months.
Following the ruling, Miss Reilly said: "I don't think I am above working in shops like Poundland. I now work part time in a supermarket. It is just that I expect to get paid for working.
"I agree we need to get people back to work but the best way of doing that is by helping them, not punishing them."
Following the ruling, Labour accused the coalition of being "incompetent" and unions hailed Miss Reilly a "hero" as they called for the programmes to be scrapped.
But the Government pointed out that the judges had agreed requiring people to join the schemes was legal, meaning they could continue.
Employment minister Mark Hoban said it would appeal the ruling while also drafting new regulations immediately to remove "any uncertainty".
"Ultimately the judgment confirms that it is right that we expect people to take getting into work seriously if they want to claim benefits," he said.
Public Interest Lawyers, which represented both claimants, called the decision a "huge setback" for the DWP.
Shadow work and pensions secretary Liam Byrne said: "It beggars belief that David Cameron's Government is now so incompetent it can't even organise work experience."