The government’s own evaluation had, said Justice Spencer, failed to consider discrimination on grounds of nationality at all – only on grounds of ethnicity.

Right to Rent made landlords responsible for checking the immigration status of their tenants, with the prospect of prosecution if they know or have “reasonable cause to believe” the property they are letting is occupied by someone who does not have the right to rent in the UK.

It was introduced by Theresa May when she was Home Secretary as a key plank of the government’s ‘hostile environment’ for illegal immigrants.

The Residential Landlords Association (RLA) joined with Liberty to intervene in a case brought by the Joint Council for the Welfare of Immigrants (JCWI) to have the policy declared as incompatible with human rights.

This was on the grounds that Right to Rent was leading to discrimination against non-UK nationals, who might be in the country legitimately, and British ethnic minorities.