The government is taking emergency action after the Court of Appeal ruled in favour of a graduate that unpaid work schemes are legally flawed.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

Three judges in London ruled that the regulations under which most of the government's back-to-work schemes were created are unlawful, because they failed to give unemployed people enough information, and quashed them.

Cait Reilly, 24, who worked at Poundland for two weeks for no pay, and 40-year-old unemployed HGV driver Jamieson Wilson, from Nottingham, both succeeded in their claims that the unpaid schemes were legally flawed.

Their solicitors said later the ruling means "all those people who have been sanctioned by having their jobseeker's allowance withdrawn for non-compliance with the back-to-work schemes affected will be entitled to reclaim their benefits".

A legal battle now looms over whether jobless people who had benefits stopped because they refused to take part in the schemes are entitled to a refund.

We have no intention of giving back money to anyone who has had their benefits removed because they refused to take getting into work seriously. DWP spokesman

However the government denied the case set a precedent for unemployed people. Officials are reportedly appealing the decision and are drafting emergency laws with more detail on the schemes' regulations in the hope that judges will allow the schemes to continue.

'Disappointed and surprised'

"We have no intention of giving back money to anyone who has had their benefits removed because they refused to take getting into work seriously," said a department for work and pensions spokesman. "We are currently considering a range of options to ensure this does not happen."

Employment Minister Mark Hoban said he was disappointed and surprised at the court's decision and said the government would be pushing through emergency regulations to enable the schemes to continue.

In November 2011, Miss Reilly had to leave her voluntary work at a local museum and work unpaid at the Poundland store in Kings Heath, Birmingham, under a scheme known as the "sector-based work academy".

She was told that if she did not carry out the work placement she would lose her jobseeker's allowance. For two weeks she stacked shelves and cleaned 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 known as the community action programme. He objected to doing unpaid work that would not help him re-enter the jobs market, and was stripped of his jobseeker's allowance for six months after refusing to participate.

'Huge setback' for DWP

Ms Reilly, who lost her case in the High Court but won on appeal, said: "I am delighted with today's judgment.

"I brought this case because I knew it was wrong when I was prevented from doing my voluntary work in a museum and forced to work in Poundland for free for two weeks as part of a scheme known as the sector based work academy."

After the ruling public interest lawyers, who represent Ms Reilly and Mr Wilson, said the court of appeal's unanimous decision was a "huge setback for the Department for Work and Pensions (DWP), whose flagship reforms have been beset with problems since their inception".

They said that "until new regulations are enacted with proper parliamentary approval, nobody can be compelled to participate on the schemes".

All of those who have been stripped of their benefits have a right to claim the money back that has been unlawfully taken away from them. Solicitor Tessa Gregory

Solicitor Tessa Gregory said: "Today's judgment sends Iain Duncan Smith back to the drawing board to make fresh regulations which are fair and comply with the court's ruling.

"Until that time nobody can be lawfully forced to participate in schemes affected such as the work programme and the community action programme. All of those who have been stripped of their benefits have a right to claim the money back that has been unlawfully taken away from them."

But not everyone believe the ruling will have such widespread implications. Matthew Oakley, head of economics and social policy at Policy Exchange, said: "Let's be clear. This is not a ruling against back-to-work schemes and should not be seen as some sort of body blow to the government's welfare plans."