Five disabled tenants have lost their Court of Appeal bid to have the Government's so-called "bedroom tax" declared unlawful.
The court also turned down two lone parents' challenge to the legality of the Government's benefit cap, rejecting claims its impact on vulnerable families violates human rights laws and the common law.
Judges dismissed accusations that the bedroom tax unlawfully discriminates against the disabled.
Lord Dyson, Master of the Rolls, said the legal challenges were to two "of the Government's most controversial measures" relating to state benefits.
The judge said the court could only intervene if the measures "were manifestly without reasonable foundation".
He ruled that that stringent test was not satisfied and both challenges must fail.
The group who challenged the bedroom tax vowed to continue their battle following the Court of Appeal ruling.
Ugo Hayter from law firm Leigh Day, representing two of the five, said: "The court recognised that our clients and thousands of disabled people across the UK had a need for accommodation not provided for by the new housing benefit rules, however the court decided that disabled tenants should not have their housing needs met on an equivalent basis to their able-bodied counterparts, just because they are disabled.
"Instead disabled tenants are being forced to rely on short-term and discretionary payments. We are currently considering whether an appeal to the Supreme Court is possible."
Anne McMurdie, of Public Law Solicitors, whose firm acts for three of the appellants. said: "The Government has sought to make savings by targeting the most vulnerable in our society.
"On the Government's own figures at least 440,000 disabled households will lose out under the new regulations. There is compelling and growing evidence of the terrible adverse impact on disabled tenants, having to make the dreadful choice between paying the rent and buying food or heating their homes."
The Department for Work and Pensions , which was a defendant in both legal actions, welcomed the court's ruling.
A spokesman said: "We are pleased that the courts have once again found in our favour and agreed our policy is lawful.
"Reform of housing benefit in the social sector is essential to ensure the long-term sustainability of the benefit. But we have ensured extra discretionary housing support is available for vulnerable people."
Referring to the benefit cap, the spokesman added: ""We are pleased that the courts have ruled again that the benefit cap complies with the European Convention on Human Rights.
"The benefit cap sets a fair limit to what people can expect to get from the welfare system - so that claimants cannot receive more than £500 a week, the average household earnings."
:: Watch Sky News live on television, on Sky channel 501, Virgin Media channel 602, Freeview channel 82 and Freesat channel 202.