By Chai Patel

Today the High Court ruled that Theresa May’s plan to create "a really hostile environment" for undocumented migrants by forcing private landlords to carry out immigration checks is causing racial discrimination. Classic Theresa. She never did see a burning injustice she couldn't tackle with petrol.

Having worked on this case for over three years now, you'd expect me to be elated to have a High Court judge tell me we were right, that he hopes legislators who enacted this would be "aghast" at the discrimination caused, and that the government "failed to justify the scheme".

And I am elated. We have knocked out a key plank of the Hostile Environment – or 'compliant environment' in Sajid Javid double-speak- which basically means that everyone, from your landlord, your doctor and eventually no doubt your neighbour, are supposed to check your papers every time you leave the house.

But I’m also despairing that it took this long to make the government see the blindingly obvious. Even as we speak, their lawyers are preparing an appeal that argues that it should be legal for the government to cause racial discrimination in the housing market.

Back when this scheme was a twinkle in our current prime minister's eye, then-communities secretary Eric Pickles warned David Cameron that "anyone foreign-looking" would face difficulty accessing private rental accommodation.

JCWI, Shelter, Crisis and many others warned the former prime minister and the current one that landlords, faced with fines, delays and complex administration, would just take the easy way out and rent to people with British passports, or who looked and sounded clearly British. Landlords themselves said exactly the same things.

At every stage Theresa May, the Home Office and the government have refused to listen to logic and evidence. They have clung to the Hostile Environment with a zeal borne from blind faith in one thing, and one thing alone: we need to be nastier to foreigners so the ones who shouldn't be here, leave.

Such is their faith that they refused to monitor landlord immigration checks, or any part of the Hostile Environment. In the aftermath of the Windrush scandal, Amber Rudd admitted all they had was anecdotal evidence for whether it worked.

Mr Justice Spencer found today that the scheme "had little or no effect" on immigration control and criticised the government for not making the slightest effort to collect data that would help them justify it or monitor for instances of unfair discrimination.

The lessons we've learnt today apply to all parts of the Hostile Environment. If you outsource immigration checks to conscripted amateurs, whether they be landlords or nurses, you will foment and legitimise racism and xenophobia in our communities. How long will it take the government to learn that the policy cannot survive? 

Chai Patel is legal policy director at the Joint Council for the Welfare of Immigrants (JCWI).

The opinions in's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.