Just when you were minded to think that Supreme Court judges were a bunch of diehard liberals whose fundamentalist belief in the application of human rights overrides common sense, they deliver a judgement which makes them look like the pathetic toadies of an authoritarian government.

This morning the court upheld a rule that forbids British citizens bringing a foreign spouse into the country unless they (the British citizen, not the foreign spouse) is earning at least £18,600 a year (or £22,400 if they have one or more children). I am in favour of controls on immigration, but this is a rule which stinks of discrimination and injustice. It is hard to see how it is anything but a blatant breach of the right to a family life, enshrined within the European Convention on Human Rights. And yet the Supreme Court has upheld it.

I know we have a problem with bogus marriages, but there is an easy enough way to deal with them – make the spouse’s right to residence in Britain dependent on the marriage for, say, at least 10 years, so that if the marriage ended in divorce the foreign spouse would have to return home. But it is cynical and wrong to treat all British citizens who fall in love with a foreign national as if they were fraudsters and human traffickers. Splitting up genuine families in a futile effort to trim a few off the net migration figures is a horrible use of power. Do we really want husbands and wives, parents and children, kept apart by British immigration officials just as so many were by the Berlin Wall?

The income law doesn’t, in any case, guard against sham marriages involving a British citizen who is earning more than £18,600 – all too likely in the case of chancers and fraudsters. It is simply discrimination against the poor. As for the argument that allowing people to bring foreign spouses places unreasonable demands on the welfare system I am not convinced. The effect of the ban is needlessly to create single-parent families which are far more likely to be benefit-dependent than two-parent ones. The foreign spouse – whose earnings and earning-potential are ignored – could make all the difference between a family being on benefits and supporting itself.

Like most Conservatives, Theresa May likes to dress up her speeches with references to family values. They sit rather ill-at-ease with her introduction, as Home Secretary in 2012, of the £18,600 rule. In today’s ruling, the Supreme Court judges did subject it to some criticism. But they should have gone further and thrown it out as a breach of human rights.