The Court of Appeal has rejected the government's attempt to overturn a High Court ruling on a new policy clamping down on asylum seekers claiming benefit.
David Blunkett's tough new policy started in January
Appeal judges rejected a bid by David Blunkett to reverse Mr Justice Collins' ruling that new rules aimed at asylum seekers who delayed their application had breached the European Convention on Human Rights.
However the Court of Appeal judges said they could see no reason why the new regulations could not work effectively once a few changes had been made.
Mr Blunkett said the ruling vindicated his decision to appeal and meant the law was not incompatible with the human rights convention.
Legislation introduced in January prevented people from claiming state-funded food and shelter if they did not immediately apply for asylum on arrival.
The High Court had heard six test cases of people fleeing countries such as Ethiopia and Iraq who had been refused state help while their claims were being processed because they had failed to apply for asylum at the port of entry.
Mr Justice Collins quashed the refusals in February and ordered the cases to be reconsidered in the light of his judgment.
On Tuesday Lord Phillips, sitting with two other senior judges, said Mr Justice Collins's conclusion was correct as the six cases had been wrongly refused as a result of deficiencies in procedure.
"We were told by the Attorney General that these procedures are being radically overhauled," he said.
"When they have been put in order we can see no reason why (the new regulations) should not operate effectively."
He said the new policy may cause the proportion of asylum seekers who claim asylum at the port of entry to rise significantly.
"Those who claim 'in country' will be at risk of being denied support," he said.
"This will almost certainly be the fate of those who remain in this country for an appreciable period without claiming asylum."
Both the home secretary and groups campaigning for the rights of asylum seekers are claiming victory from the ruling.
Mr Blunkett said in a statement that he was pleased the appeal court judges had backed the "key principle" of his legislation which would allow the asylum system to continue operating in the same way.
"We have already made changes to our procedures to ensure that individual cases get full and fair consideration," he said.
"But it was the key principle that was at stake here and on this we won."
He said the ruling upheld the view that it was entirely reasonable to expect people fleeing from persecution to claim asylum "as soon as reasonably practicable".
He added that the Home Office would "consider if any further changes are needed in the light of the court's judgment".
Civil rights group Liberty said it was a "devastating defeat" for Mr Blunkett which "provided hope for civilians fleeing Saddam Hussein's Iraq and other tyrannical regimes".
Spokesman Mark Littlewood said the policy of denying asylum seekers access to welfare or the right to work "lies in tatters" after the ruling.
"The Court of Appeal has ruled that denying asylum seekers support and the right to work would amount to degrading treatment under the European Convention on Human Rights.
"We think it is reasonable to expect asylum claims to be made as soon as reasonably practicable, but there were factors the government was not considering, which forced people into destitution.
"The operation of the law is now going to be much fairer - it will have to be made compatible with the human rights convention."
Habib Rahman, chief executive of the Joint Council for the Welfare of Immigrants (JCWI), said: "This decision represents victory for the basic principles of humanity and compassion which the UK has historically extended to all those who are here.
"Asylum seekers should not be treated differently to anyone else.
"The government should now acknowledge that it cannot compromise the basic rights of asylum seekers simply to achieve political targets and to deter them from coming to the UK."
Shadow home secretary Oliver Letwin said the legal uncertainty confirmed his view that the entire asylum system needed to be scrapped and replaced with a quota of genuine refugees.
"This will require renegotiation of or withdrawal from international agreements," he said.