The law requires asylum seekers to apply at port of entry
Home Secretary David Blunkett has vowed to fight a High Court victory for six asylum seekers denied housing and benefits.
Legislation introduced in January prevented people from claiming state-funded food and shelter if they did not immediately apply for asylum on arrival.
But Mr Justice Collins said the rules as they were applied in the six test cases breached the
European Convention on Human Rights.
The judge's decision could spark a flurry of similar claims - around 175 asylum seekers have already begun legal action on similar grounds, say campaigners.
Mr Blunkett told BBC Radio
4's The World at One: "Frankly, I'm personally fed up with having to deal with a situation where
Parliament debates issues and the judges then overturn them.
Parliament can surely not have intended that genuine refugees should be faced with the bleak alternatives of returning to persecution or of destitution
Mr Justice Collins
"I don't want any mixed messages going out so I am making it absolutely clear
today that we don't accept what Justice Collins has said.
"We will seek to overturn it. We will continue operating a policy which we
think is perfectly reasonable and fair."
He added the law - that people should claim asylum "as soon as reasonably practicable" - still stood.
The appeal will be heard on 3 March.
The judge said "insufficient consideration" had been given to individual cases.
Decisions made in the case of each of the six "must be quashed and reconsidered, if that has not already happened."
"Parliament can surely not have intended that genuine refugees should be faced with the bleak alternatives of returning to persecution or of destitution," he said.
"It is obvious that those least likely to leave the United Kingdom will be those who are genuinely fleeing persecution."
Barry Stoyle, chief executive for the Refugee Legal Centre, said he was delighted with the ruling.
He said Mr Blunkett's interpretation of section 55 of the Nationality, Immigration and Asylum Act 2002 was too strict and did not allow for asylum seekers making claims very soon after arrival in the UK.
Mr Stoyle said: "Such rigorous adherence to the act means many asylum seekers are becoming
Margaret Lally of the Refugee Council said the ruling had been a victory for common sense.
"The law as set out does not prevent abuse of the system. Asylum seekers who have been in the country just 24 hours have been denied food and shelter."
Shadow home secretary Oliver Letwin told The World at One: "The only route now through this chaos is to abolish the whole asylum seeking
system and replace it by a rational system of quotas for genuine refugees."
Liberal Democrat asylum spokesman Michael Moore told BBC News: "Humanity must now return to asylum policy."
Keir Starmer QC, representing five of the group, told the court the government's policy had forced them onto the streets.
Campaigners say refugees are forced on to the streets
He said an Iraqi man had spent the night "in a telephone box and a tunnel" and a young woman from Ethiopia was found at Heathrow Airport.
The six claimants, from Iran, Angola, Rwanda, Ethiopia and Iraq, have been on emergency support pending the outcome of the legal action.
The Home Office has maintained the regulations were designed to stop immigrants who have been working illegally using the asylum system to delay their removal.