Two single mothers have lost their Supreme Court challenge against cutbacks in the benefits system.
The women, who had both been victims of domestic violence, had argued the cap had a discriminatory effect on women, especially those seeking to escape violent partners.
But the court ruled by a 3-2 majority that the government's benefit cap regulations were not unlawful.
Work and Pensions Secretary Iain Duncan Smith said he was "delighted".
The Supreme Court decision upholds a Court of Appeal ruling that the capping measures were lawful.
'Right and fair'
The benefit cap limits the amount of benefits a household can receive to £500 a week for couples and £350 a week for households of a single adult.
Lord Reed, giving the lead judgment, said he accepted that the cap was "a proportionate means" of meeting legitimate government aims including reducing the deficit and incentivising parents to find work.
But Lady Hale - one of the dissenting judges - ruled that the government had failed to take proper account of "the best interests of the children".
Mr Duncan Smith said: "I am delighted that the country's highest court has agreed with this government and overwhelming public opinion that the benefit cap is right and fair.
"I am proud to say that it is one of the most significant reforms we've implemented over the past five years.
"The benefit cap is encouraging people to change their behaviour and motivating them to find work."
Although a majority of the judges upheld the cap as lawful, there was criticism from three of them that it was not in line with the UN Convention on the Rights of the Child (UNCRC).
However, Lord Carnwath said "it is in the political, rather than the legal, arena that the consequences should be played out".
The majority also agreed that it was not the function of the courts to determine how much public expenditure should be devoted to welfare benefits.
Rebekah Carrier, the women's lawyer, said it was wrong for Mr Duncan Smith to say the Supreme Court have found the benefits cap to be "fair".
She said: "The majority has found the cap to be lawful, but that is not the same as fair. If anything three of the five are very critical of the impact of the cap on children.
"My clients have been hit by the benefit cap because of their flight from violence and because of high private sector rents which they cannot avoid.
"The cap is causing serious hardship to families across the country and to local authorities who are struggling to find accommodation for homeless families in crisis."
She added: "A majority of the Supreme Court has held that the cap breaches international protections for the rights of children. The government must halt this policy and comply with its international obligations, and its own promise to ensure its policies comply with the UN Convention."
Alison Garnham, chief executive of the Child Poverty Action Group, said: "As three of the judges have said, it cannot be in the best interests of the children affected by the cap to deprive them of the means of having adequate food, clothing, warmth and housing.
"We hope the Government will listen to the court and comply with international law on the protection of children."