At least 20,000 people have been denied information that could prove their right to stay in the UK, in what campaigners are warning is a revival of the ‘hostile environment’.

A controversial loophole – passed into law despite warnings it risked “the next Windrush” – has been used to block almost 43 per cent of requests for the government to release vital data, The Independent can reveal.

The huge impact of the clause – allowing data to be kept secret if release would “undermine immigration control” – comes despite ministers promising it would be used only on a “case-by-case basis”.

Campaigners and MPs seized on the revelation to demand that the Home Office end the secrecy surrounding the ‘immigration exemption’, to prove it was not “complicit in further injustices”.

Diane Abbott, Labour’s shadow home secretary, attacked a “shameful abuse of process”, while Liberty said the legacy of Theresa May’s notorious immigration clampdowns was still inflicting harm.

“This shows that the immigration exemption is just another tool used by the government to enforce its hostile environment,” said Gracie Bradley, the civil liberties group’s policy manager.

Two years ago, lawyers echoed fears that withholding potentially vital proof of the right to live in the UK would lead to people being wrongly deported, detained or denied health treatment.

The clash was billed as the “first test” of government promises to learn the lessons of the Windrush debacle – but the loophole was nevertheless created by the Data Protection Act.

Now a freedom of information response to The Independent has revealed that 45,238 “subject access requests” for information were made between May 2018 and January 2020.

The immigration exemption was used to block or restrict the release of data for no fewer than 19,353 of those applications – 42.8 per cent – the Home Office said.

However, the database was only able to record such instances from July 2018, which means the true total of thwarted requests is almost certainly above 20,000.

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

Yet, when questioned as the act was passed, ministers insisted fears of widespread use were misplaced, insisting it would only be deployed on “a case-by-case basis”.

The exemption “does not give the Home Office a free hand to invoke the permitted exceptions as a matter of routine”, Victoria Atkins, the then home office minister told MPs in March 2018.

“The exemption will not and cannot be targeted at whole classes of vulnerable individuals, be they victims of domestic abuse or human trafficking, undocumented children or asylum seekers,” she also pledged.

Ms Abbott told The Independent: “There can be no doubt that the government is using this exemption to conceal facts that might help the migrant.

“This is a shameful abuse of process by the government. It makes it almost certain that more Windrush type scandals will eventually emerge.”

David Lammy, a Labour MP and Windrush campaigner, said: “The Home Office has shown repeatedly, before, during and after the Windrush scandal, that it makes frequent mistakes that ruin people’s lives.

“It is an outrage that 20,000 people have been denied access to information the government holds about them under this exemption. The Home Office is complicit in further injustices that we simply do not know about.”

And Ms Bradley added: “Everything about the exemption and how it’s used is shrouded in secrecy – people don’t know things such as whether it’s being used to access their health or education records.”

It is unclear how many requests were refused outright, how many saw data partially redacted, or whether some files were eventually released after requests for additional information about the applicant.

The use of subject access requests has mushroomed as awareness has grown and as the hostile environment laws have required strict proof of immigration status to live and work.

The Law Society, which represents solicitors, and the Bar Council, which represents barristers, had also warned people would be unable to obtain files about themselves.

And 34 organisations, including Amnesty, the Refugee Council, the National Aids Trust, the National Education Union and the trade union Unison, signed a protest letter.

A Home office spokesperson said: “The government takes both the protection of personal data and the right to privacy extremely seriously.

“The immigration exemption can only be applied where it is necessary and proportionate to do so, and where to uphold a data subject request would be likely to prejudice the maintenance of effective immigration control.