I t was Theresa May who, as home secretary, declared in 2012 that her aim was to “create, here in Britain, a really hostile environment for illegal immigrants”. It was May’s department that sent out vans with messages telling undocumented migrants to “go home” emblazoned across them.

And it was under her premiership that the Windrush scandal erupted, with thousands of Commonwealth citizens wrongly targeted for deportation, leaving seriously ill people too afraid to access proper healthcare in case it led to their removal from the UK.

But while the most notorious examples of the hostile environment were overseen by May, the prime mover behind the policy – according to ministers and officials from the coalition government – was her predecessor in No 10, David Cameron.

It marked a sea change in immigration policy in 2010 when Cameron pledged to bring annual net migration down to the tens of thousands. Such a drastic reduction – on a crude scale that took no account of where migrants were from, why they had come to Britain or what their skills were – would take a dramatic hardening of Britain’s rules on immigration.

Tory heavyweight Eric Pickles was far from a shrinking violet, memorably claiming householders who left wheelie bins in the street “should be flogged”. But during his time as local government secretary in the coalition, there was one idea floated by his boss in 2013 that caused him to quail at its sheer unfairness and impracticality: making landlords check the immigration status of prospective tenants before letting out homes to them.

Why is the Home Office getting so many immigration decisions wrong?

“I thought it was ill-conceived – utterly wrong,” says Pickles. “If you’re a landlord, how the heck do you know what various documents look like? And wouldn’t you say to yourself, ‘Well heck look, this person’s got dark skin or a funny sounding surname, the safest thing is not to rent to them?’”

When Pickles voiced his opposition to the proposal at a ministerial meeting, as he sat alongside deputy prime minister Nick Clegg, Jeremy Hunt and Oliver Letwin, Cameron blew up. Ministers remember the meeting “collapsing into chaos” as the prime minister slammed his red folder on the table and stormed out of the room before they had finished the agenda. It was the first and only time Pickles felt the wrath of his boss directed against him so vociferously. “I had a really good relationship with David, and we continued to have a good relationship,” he says. “But he got up and walked out of the meeting. He was so angry with me.”

What many ministers had failed to realise was that the policy Cameron was pushing through, which he finally managed to implement in the final year of his leadership through the controversial Right to Rent scheme, was an early sign of a much bigger shift in the way the government dealt with immigration. Over the next few years, under the banner of this bid to create a “hostile environment”, policies were brought in that placed the onus on ordinary people – such as landlords, doctors and employers – to check the immigration status of anyone trying to access their services, and block anyone who couldn’t provide the relevant documents.

This catch-all strategy is what caused the Windrush scandal, which led to Amber Rudd’s resignation in April 2018. People with the right to be in Britain were denied life-saving medical treatment and prevented from working or accessing benefits, plunging them into destitution. In the worst cases, men and women who had lived in the UK for decades suddenly found themselves detained in immigration centres and forcibly removed to countries they had not been to since they were young children – all in error.

The early thinking behind the hostile environment was encapsulated by the creation of a ministerial group in 2012 designed “on the explicit instructions of the prime minister”. Initially dubbed the “hostile environment working group”, its very purpose was to “bear down on immigration”. It brought together ministers from 12 government departments in order to investigate how they could “enforce” the immigration system and “toughen it up”. Following complaints from Liberal Democrats about the name, the group was re-titled “Matbaps” – migrants’ access to benefits and public services – a “bland and boring title on something quite dehumanising”, as one former Lib Dem adviser puts it.

While the working group started off as a fairly low-level operation, it quickly became a central plank in the prime minister’s agenda. According to David Laws, who as schools minister was part of the group, May focused on the policy implementation, while Cameron propelled the politics, seeing it as “red meat” to feed to the right of the Tory party. He recalls that after just one meeting at minister of state level, Cameron “pounced on” the group and turned it into a cabinet committee which met in No 10. “He was thinking of it very much in terms of being tough on immigration, knocking down the Ukip vote, showing that we were taking decisive action, grabbing newspaper headlines,” says Laws. “He desperately wanted to be seen to be doing something on immigration, and he wanted this to be a big initiative that he was going to drive forward.”

Windrush generation: threat of deportation from UK Show all 15 1 /15 Windrush generation: threat of deportation from UK Windrush generation: threat of deportation from UK The ex-troopship 'Empire Windrush' arriving at Tilbury Docks from Jamaica, with 482 Jamaicans on board, emigrating to Britain. Getty Windrush generation: threat of deportation from UK Jamaican immigrants being welcomed by RAF officials from the Colonial Office after the ex-troopship 'Empire Windrush' landed them at Tilbury. PA Windrush generation: threat of deportation from UK Alford Gardner who arrived in Britain in 1948 on the first Windrush ship to dock in Tilbury, Essex, speaking at his home in Leeds PA Windrush generation: threat of deportation from UK Alford Gardner in Leeds shortly after he arrived in Britain in 1948 on the first Windrush ship to dock in Tilbury, Essex PA Windrush generation: threat of deportation from UK Gardner was 22 years old when he boarded the ship in Kingston, Jamaica, with his brother Gladstone before they and hundreds of Caribbean migrants called on to rebuild post-war Britain disembarked the ship in Tilbury Docks PA Windrush generation: threat of deportation from UK Alford Gardner (right), during his RAF service in 1947 PA Windrush generation: threat of deportation from UK The son of Ruth Williams, a Windrush-generation immigrant, wants to the leave the country after threats of deportation. According to his mother, Mr Haynes applied for British citizenship in 2016 but was rejected, despite Ms Williams having lived in the UK almost permanently since arriving from St Vincent and the Grenadines in 1959. Ruth Williams, 75, said she felt "betrayed" by Britain after the Home Office twice turned down applications for her 35-year-old son, Mozi Haynes, to remain in the country. Ms Williams is understood to have cancer and said she relies heavily on her son for support. PA Windrush generation: threat of deportation from UK The British liner 'Empire Windrush' at port in 1954. Getty Windrush generation: threat of deportation from UK Ruth Williams, 75, with her British passport. "I feel betrayed and a second class citizen in my own country," she said. "This makes me so sad and the Home Office must show some compassion. "I am unwell and almost 75, I live on my own and I need my son to stay here. I need my family around me and I can’t face being alone. He has applied to the Home Office and been refused twice." PA Windrush generation: threat of deportation from UK From the top, hopeful Jamaican boxers Charles Smith, Ten Ansel, Essi Reid, John Hazel, Boy Solas and manager Mortimer Martin arrive at Tilbury on the Empire Windrush in the hope of finding work in Britain. Getty Windrush generation: threat of deportation from UK Jamaicans reading a newspaper whilst on board the ex-troopship 'Empire Windrush' bound for Tilbury docks in Essex. Getty Windrush generation: threat of deportation from UK After half a century in Britain, Anthony Bryan decided it was time to go abroad. But the decision set off a nightmare that saw him lose his job, detained twice and almost deported to Jamaica. AFP/Getty Windrush generation: threat of deportation from UK Jamaica-born Anthony Bryan poses outside his home in Edmonton, north London. Now 60 and a grandfather, Bryan thought the issue could be resolved swiftly, as he legally moved to Britain with his family as part of the Windrush generation of Caribbean migrants after World War II. In 1948, the ship Windrush brought the first group of migrants from the West Indies to help rebuild post-war Britain, and many others followed from around the Commonwealth. A 1971 law gave them indefinite leave to remain, but many never formalised their status, often because they were children who came over on their parents' passports and then never applied for their own. AFP/Getty Windrush generation: threat of deportation from UK Three Jamaican immigrants (left to right) John Hazel, a 21-year-old boxer, Harold Wilmot, 32, and John Richards, a 22-year-old carpenter, arriving at Tilbury on board the ex-troopship 'Empire Windrush', smartly dressed in zoot suits and trilby hats. Getty Windrush generation: threat of deportation from UK Newly arrived Jamaican immigrants on board the 'Empire Windrush' at Tilbury in 1948. Getty

One of the few MPs to raise concerns about the hostile environment early on was Lib Dem Sarah Teather, who was minister for children and families from 2010 to 2012. She remembers the first warning sign was a proposal to introduce an income threshold for people applying for spousal visas to join their loved ones in the UK, with figures floated as high as £40,000 – leaving her outraged. “It seemed so absurd at the time that we thought it was just Conservatives being out of touch,” she says, adding: “But actually it was a sign of something else.”

Teather became even more horrified when ministers began discussing the idea of refusing school places for the children of undocumented migrants as a way of encouraging more to leave and dissuade others from coming to the UK, fearing it would “erode” the right to education. The MP was equally as appalled by a proposal for the school pupil database to be used by the Home Office to track down illegal over-stayers – an idea that was later made policy, but halted following intense pressure from campaigners.

When Teather was dropped from government in a 2012 reshuffle, she decided to voice her concerns in public, telling the Guardian she was “appalled” by the creation of the working group, warning that this “new consensus” had “stifled” the debate on immigration, and that she found it “truly terrifying”. She hoped that if she exposed what was happening it would “wake people up” and prompt an “uprising of shock and horror” at the government’s increasingly aggressive approach to cutting down immigration.

But there was no such backlash. “There was a brief gasp of shock, a ripple, and then things just moved on,” says Teather, recalling how just a week after the interview was published, the controversial “Go Home” vans were driven through her constituency. “I was hoping that putting it into the public domain would help flush it out. But it was like shouting into a vacuum.”

So the ramping up of the hostile environment continued, and this is where Ms May, as home secretary, made clear her staunch devotion to the cause. Lib Dems who worked under her in the Home Office remember a department that was “geared towards reducing immigration”, with a team of civil servants who were “willing lackeys” voicing little or no resistance to this aim. And if they did, they were “shunted off somewhere else”.

Norman Baker, who was a Home Office minister for a year from October 2013, remembers: “The immigration civil servants were of the capital T and F ‘true faith’. They were zealots. They saw it was their job to come back almost every week with some new tweak which would make immigration more difficult.” When it came to trying to voice his own concerns, Baker says May deliberately tried to keep his party out of the loop. “She didn’t let me do anything apart from my portfolio,” he recalls. “Everything was a battle with her, and you can only fight so many battles at once. There’s only so much you can do when you’ve got somebody like that.”

This frustration was shared by the leader of the Lib Dems, according to Matt Sanders, former adviser to Clegg, who describes the deputy prime minister’s relationship with May as “really, really difficult”. He recalls: “She wouldn’t negotiate. She just could not do it. We would have really frustrating meetings where Nick would say, ‘I’m worried about “X”’ and she would just restate her position. You would go through a whole meeting like that where she could not go off script.”

Sajid Javid opposes 'hostile environment' approach to UK immigration opting instead for a 'compliant environment'

Teather, who tried to reason with May on numerous occasions before she was sacked from government, remembers the home secretary “micromanaging [the department] within an inch of its life”, refusing to let anybody under her wield any power. After several attempts to negotiate with her on her campaign to end child detention – which was ultimately successful – Teather gave up on trying to engage in discussions with May. “It was clearly pointless,” she says. “She was so in control of that department, and anyone who worked under her was given very little freedom – totally disempowered.”

But while May’s role in the disasters that stemmed from the hostile environment is undisputable, those in government at the time are keen to stress the fact that she was acting on the instructions of her boss, who they say has “largely dodged the blame”. Laws, who vetoed the plan to force schools to check immigrant status of pupils, says that while May was in charge of the “practicalities”, Cameron was, “ironically, more of a driving force” who wanted to “bulldoze” the policies through. “He was the one who desperately wanted to be seen to be doing something on immigration,” Laws recalls. ”He was leading the controversial stuff, she wasn’t.”