A minimum-income threshold for people wanting to bring foreign spouses to the country has been upheld by Britain's Supreme Court.

The controversial measure allowing the government to keep spouses hailing from outside a group of mainly European Union nations out of Britain if their British partner does not earn at least 18,600 pounds ($23,000) each year (or more, if the couple has children) was introduced in 2012 as a way to make sure immigrants wouldn't draw on public welfare funds. The rule had been challenged by several couples who did not meet the minimum requirement and who argued that the law breached their right to a family life.

But the fact that the measure "may cause hardship to many does not render it unlawful," seven Supreme Court justices said in their ruling on Wednesday.

“This is central to building an immigration system that works in the national interest,” the Home Office said in a statement, according to theFinancial Times. “The current rules remain in force but we are carefully considering what the court has said in relation to exceptional cases where the income threshold has not been met, particularly where the case involves a child.”

Many couples divided by the policy lamented the court's decision, however, noting the challenges of living apart from one's spouse while struggling to meet the minimum threshold.

"The whole thing has really disrupted our entire lives," said Cory Smit, a Zimbabwean visual designer who met his British wife Vanessa Knight while studying in South Africa. The couple spent six months apart, he said, while Ms. Knight worked multiple jobs to try to meet the income requirement. They currently live in Nairobi, Kenya.

"We want to make it, we want to be paying citizens, we want to do something with our lives that would benefit the UK, but we are finding everything so hard. We just want to get our lives going, but everything is in limbo," Mr. Smit told The Guardian. "We just want the freedom to live our lives, without the costs, without the administration. It feels like your life is just on hold because of political events."

While the ruling left many disappointed, others had some reason to celebrate. Though the court deemed the law "acceptable in principle," it determined that the measure had been implemented in a "defective" way, and allowed several claimants to challenge their rejection by British immigration authorities.

In enforcing the rule, the justices said, authorities must consider the welfare of children and whether applicants have other funding sources – a judgment that earned the praise of immigrants' rights advocates.

"These are significant victories for families up and down the country," said Ms. Grant in a statement. "This judgment confirms that the government’s position is now untenable and they must now take immediate steps to protect the welfare of children in accordance with their legal duty."

"The appalling way this government has treated kids has not been lost on the Court, and alternative means of funding also now need to be taken into account," said Sonel Mehta, founder of BritCits, which campaigned on behalf of families divided by the policy, in a news release. "What this means for families though will be clearer only when we see how the government implements the required changes as they seem to have been afforded quite a bit of leeway on how they will do so."