The UK's highest court has ruled that the minimum income barrier that stops thousands of British citizens from bringing a foreign spouse to the UK is lawful.

The measure that Britons must earn more than £18,600 before they can apply for spouses or partners from non-EEA (European Economic Area) states was not considered to breach human rights legislation, seven justices at the Supreme Court ruled.

The rule was challenged as previous rules only required a couple to demonstrate that they could maintain themselves without recourse to public funds.

Tens of thousands of British families have been separated by the ruling, brought in by Theresa May, then home secretary, in 2012.

Opponents of the rule had argued that it was "obstructing family reunions for tens of thousands of people".

However, the court decided that the "rules and instructions" require amendment in relation to the duty towards children, and other funding sources available to the UK.

Following the launch of legal action, a High Court judge in London ruled in July 2013 that the introduction of the minimum income requirement (MIR), which increases if there are children, was an unjustified interference with human rights.

Mr Justice Blake said the financial requirements set out in rules introduced in July 2012 amounted to a "disproportionate interference with a genuine spousal relationship".

But the Government appealed and won its case before three judges at the Court of Appeal in July 2014.

Appeal judges said the requirement was "lawful". The Home Secretary had struck "a fair balance" after analysing the effect of the immigration of non-EEA partners and dependant children on the benefits system and "the link between better income and greater chances of integration".

A number of people affected by the regulation then took their cases the Supreme Court.

At a hearing in London in February last year, a panel of seven justices, headed by Supreme Court deputy president Lady Hale, heard submissions that the measures amounted to an "unlawful interference with core human rights", and that the minimum income level had been set "unreasonably high".

The justices heard challenges from two British citizens, Abdul Majid and Shabana Jawed, who cannot meet the requirement to bring their non-EEA spouses into the UK, and from MM, a refugee from the Lebanon who is resident in the UK and in a similar position, and his nephew AF.

A further appeal is in the case of SS, from the Democratic Republic of the Congo, who is challenging a refusal of entry clearance as the spouse of a refugee who became a naturalised British citizen, but whose earnings are below £18,600.

Immigration tribunals allowed her appeal under Article 8 (right to private and family life) of the European Convention on Human Rights. But the appeal court ruled she had not demonstrated "compelling circumstances" justifying the granting of entry clearance.

The Home Office has said that the aim of the minimum income threshold was to "ensure that family migrants do not become reliant on the taxpayer for financial support and are able to integrate effectively".