The court dismissed an appeal by Westminster, Lambeth, and Hammersmith and Fulham councils against a High Court decision that they must provide housing and "the basics for survival" to asylum-seekers who are in need of care while their claims for refugee status are being assessed.
The four men who prompted the case - from Iraq, China, Algeria and Romania - are not entitled to social security benefits, are not allowed to work in the UK, have no family or friends in the UK, and speak little or no English.
If the authorities had won their appeal, they and up to 3,000 people, most of them in the capital, could have ended up on the streets.
The appeal judges, headed by the Master of the Rolls, Lord Woolf, upheld a ruling by Mr Justice Collins last October that local councils must help people who are denied emergency aid as part of the Government's bid to curb bogus asylum applications.
The local authorities, refused leave to appeal to the House of Lords, plan to petition the law lords. But Gerry Clore, solicitor for the asylum- seekers, said he hoped that the matter had finally been put to rest.
"I would hope that the House of Lords would refuse any petition for leave to appeal against today's decision because at the end of the day Peter Lilley [Secretary of State for Social Security] was warned when he threatened to put these measures through that they would not succeed because they were unlawful," said Mr Clore.
The councils had contended that their duty to provide shelter and food was only to those in need by reason of age, illness, disability or similar circumstances, and not to able-bodied people who simply had no money.
Michael Beloff QC, for the councils, had said that as a result of the Government's new benefit restrictions last year, many asylum-seekers, who were not allowed to work, faced the choice between starvation or being sent back to the country where they claimed to have been persecuted.
However, he said that did not justify shifting the burden on to local authorities.
Westminster Council said later that it was "dismayed" by the judgment, and added that it should not be expected to shoulder any of the "unacceptable burden" while its move to appeal to the Lords was pending.
"Supporting asylum-seekers who are without accommodation or means of support is not a duty which should rest with local authorities and is fraught with legal and technical problems," it said. The cost falls on just a few London boroughs and is hugely expensive. Westminster alone will spend around pounds 8m in the next financial year providing support and accommodation for asylum-seekers."
Claude Moraes, director of the Joint Council for the Welfare of Immigrants, said: "There is a limited welcome for the confirmation that local authorities must provide a basic subsistence. But this is an overall tragedy for UK-based asylum- seekers because central government has evaded its responsibility to provide basic benefits on a consistent and humane basis," said Mr Moraes.Reuse content