Ministers should immediately exempt people "discriminated" against by the "bedroom tax" rather than write a "blank cheque" for legal fees, Labour has said.
Shadow work and pensions secretary Owen Smith told MPs the exemption should apply to victims of domestic violence and the families of severely disabled children following Wednesday's Court of Appeal ruling.
He said it would cost the Government £200,000 to exempt 280 victims of domestic violence who have panic rooms installed in their homes.
Labour MPs could be heard saying "shameful" after Work and Pensions Minister Justin Tomlinson confirmed the Government will appeal to the Supreme Court.
Court of Appeal judges ruled that a woman referred to as "A", who lives in a council house fitted with a secure panic room to protect her from a violent ex-partner, and Paul and Sue Rutherford, who look after 15-year-old grandson Warren, had "suffered discrimination" contrary to Article 14 of the European Convention on Human Rights (ECHR).
Lord Chief Justice Lord Thomas and two other Court of Appeal judges declared the discrimination had not been "justified" by the Government.
Speaking in the Commons, Mr Smith told Mr Tomlinson: "We knew the bedroom tax was cruel but we now know it's illegal.
"And this decisive ruling should mark the end to this pernicious policy. The ruling could not have been any clearer - the bedroom tax is unlawful and it is discriminatory."
Mr Smith criticised Work and Pensions Secretary Iain Duncan Smith, claiming he was not "prepared to defend his policy".
The Labour frontbencher added to Mr Tomlinson: "Crucially, as a matter of urgency, will the Government immediately exempt the two groups that have been found to have been discriminated against from paying the bedroom tax - victims of domestic violence and the families of severely disabled children?
"Can you confirm that there are 280 victims of domestic violence who have panic rooms installed in their house under the Sanctuary Scheme affected by the policy?
"And can you further confirm that exempting those people from the bedroom tax would cost the Government a mere £200,000?
"By comparison, can you tell us how many hundreds of thousands of pounds you have spent already on legal fees defending this vile policy and how much more you are prepared to spend - is this a blank cheque to defend this to the end?"
Replying to an urgent question on the Court of Appeal ruling, Mr Tomlinson said local authorities are best-placed to identify where extra support is needed - with discretionary housing payment funds increased.
He said: "On top of the £560 million since 2011, we are providing an extra £870 million over the next five years.
"The people involved in these cases are receiving discretionary housing payments. That's precisely why we have discretionary housing payments and shows that these are working.
"We welcome the fact the High Court and Court of Appeal both ruled that the public sector equality duty had been met in respect to women.
"Furthermore, we have won a Court of Appeal ruling where the court ruled in our favour on the policy of the spare room subsidy.
"In that judgment the court found that the discretionary housing payments were an appropriate means of support for those who are vulnerable.
"So this is a complex area and in terms of these two latest cases, it is a very narrow ruling."
In reply to Mr Smith's comments, Mr Tomlinson said: "To be absolutely clear, this is about whether it's possible to define such exemptions or whether direct housing payments through local authorities give the right flexibility to help a wide range of those in need.
"We will be appealing this to the Supreme Court.
"This is to be clear - if you try to set strict categories, people especially with unique circumstances and issues, they could fall just below an artificial line. That means they would miss out.
"Is it realistic to expect that here in London we could set such an exhaustive list?
"Direct housing payments, of which we are providing £870 million over the next five years, give flexibility that allows you to work with organisations like the police, social services, medical professionals to give a coordinated level of support, underwritten by the public sector equality duty."
He added: "We keep making references to taxes - what about the 1.7 million people on the social housing waiting list? What about the 241,000 people in over-crowded accommodation?
"There is absolutely scant regard for those. These are the people we are talking for. It's right to provide flexibility, a coordinated approach. This is the right thing to do."
Ian Blackford, the SNP's shadow pensions spokesman, said it was a "disgrace" that Mr Tomlinson replied to the urgent question instead of the Secretary of State as he labelled the so-called "bedroom tax" as "Dickensian".
But Mr Tomlinson defended the fact that he was at the despatch box instead of Mr Duncan Smith.
He said: "In fairness, I am the minister who responds to housing issues in parliament."
Meanwhile the Tory MP for Gloucester, Richard Graham, hit out at what he described as the "opportunism" being displayed by Labour over the issue.
"Clearly we shall all wait for the Supreme Court judgment in due course but there are two points today that must be clear," he said.
"Does the minister agree with me that the incredible indignation gathered by the shadow minister is blown apart by the fact that the family in question are in fact receiving exactly the same amount of benefits that they were before the introduction of the spare bedroom subsidy?
"Their opportunism is shown very clearly by the fact that it was they who took away the spare room subsidy for the much larger number of people in the private rented sector."
Mr Tomlinson replied: "That is absolutely right. These cases, they are in receipt of payment which shows discretionary housing payments do work and it shows that through flexibility you can do a co-ordinated approach with the police, with social services, with medical professionals and other agencies."
Labour MP Barry Sheerman (Huddersfield) urged the minister to "wake up" and realise that the "bedroom tax" was a "miserable, vindictive little policy".
Meanwhile, a furious Andrew Gwynne blasted it as "disgusting and pernicious".
The Labour MP for Denton and Reddish repeated calls for the Government to disclose how much money it is spending defending its policy in the courts.
He asked: "How much is this Government wasting of public money to defend the indefensible?"
Mr Tomlinson replied: "That level of anger pretty much matched some of the families I met waiting on the waiting list that you wish to turn a blind eye to."