A proposal floated by Boris Johnson to introduce an amnesty for undocumented migrants – which he previously said would help prevent another Windrush scandal – has been quietly scrapped by the government.

The prime minister, who initially advocated the idea when he was London mayor as an “earned amnesty” for illegal immigrants, reiterated his support for the move on becoming leader of the country last July, telling MPs that his government would consider bringing in such a policy.

However, when asked about the plans by Labour MP Dr Rosena Allin-Khan​ in a parliamentary question this month, Home Office minister Victoria Atkins appeared to shoot them down, saying the immigration rules “already provide for undocumented migrants to regularise their status”.

Ms Atkins said: “The government remains committed to an immigration policy which welcomes and celebrates people to the UK through safe and legal routes but deters illegal immigration.”

Campaigners said rowing back on the proposal would leave migrant workers without “vital protection”, which they said would be increasingly important after Brexit in order to prevent labour exploitation, and accused the prime minister of “posturing”.

Boris Johnson's cabinet: Who's in and who's out Show all 40 1 /40 Boris Johnson's cabinet: Who's in and who's out Boris Johnson's cabinet: Who's in and who's out In: Jacob Rees-Mogg Jacob Rees Mogg appointed Leader of the Commons AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Esther McVey Esther McVey appointed housing secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Jo Johnson Jo Johnson appointed new business and energy secretary EPA Boris Johnson's cabinet: Who's in and who's out In: Brandon Lewis Brandon Lewis appointed immigration secretary Getty Boris Johnson's cabinet: Who's in and who's out In: James Cleverly James Cleverly appointed Conservative Party chairman PA Boris Johnson's cabinet: Who's in and who's out In: Baroness Evans Baroness Evans remains Leader of Lords PA Boris Johnson's cabinet: Who's in and who's out In: Julian Smith Julian Smith appointed Northern Irish secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Alister Jack Alister jack appointed Scottish secretary PA Boris Johnson's cabinet: Who's in and who's out In: Alun Cairns Alun Cairns remains Welsh secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Grant Shapps Grant Shapps appointed transport secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Alok Sharma Alok Sharma appointed international development secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Robert Buckland Robert Buckland appointed justice secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Amber Rudd Amber Rudd remains work and pensions secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Robert Jenrick Robert Jenrick appointed housing and communities secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Andrea Leadsom Andrea Leadsom appointed business secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Nicky Morgan Nicky Morgan appointed culture secretary Getty Boris Johnson's cabinet: Who's in and who's out In: Gavin Williamson Gavin Williamson appointed education secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Theresa Villiers Theresa Villiers appointed environment secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Liz Truss Liz Truss is appointed international trade secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Ben Wallace Ben Wallace appointed defence secretary EPA Boris Johnson's cabinet: Who's in and who's out In: Stephen Barclay Stephen Barclay remains EU secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Dominic Raab Dominic Raab appointed foreign secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Priti Patel Priti Patel appointed home secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out In: Michael Gove Michael Gove given Chandellor of the Duchy of Lancaster AFP Boris Johnson's cabinet: Who's in and who's out In: Sajid Javid Sajid Javid is appointed Chancellor of the Exchequer AP Boris Johnson's cabinet: Who's in and who's out Out: Jeremy Hunt Jeremy Hunt sacked as foreign secretary Reuters Boris Johnson's cabinet: Who's in and who's out In: Matt Hancock Matt Hancock remains health secretary AFP/Getty Boris Johnson's cabinet: Who's in and who's out Out: Chris Grayling Chris Grayling resigned as transport secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Jeremy Wright Jeremy Wright sacked as culture secretary PA Boris Johnson's cabinet: Who's in and who's out Out: Karen Bradley Karen Bradley sacked as Northern Ireland secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: James Brokenshire James Brokenshire sacked as housing and communities secretary Reuters Boris Johnson's cabinet: Who's in and who's out Out: Penny Mordaunt Penny Mourdaunt sacked as defence secretary Reuters Boris Johnson's cabinet: Who's in and who's out Out: Liam Fox Liam Fox sacked as international trade secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Greg Clarke Greg Clarke sacked as business secretary PA Boris Johnson's cabinet: Who's in and who's out Out: David Mundell David Mundell sacked as Scottish secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: Damien Hinds Damien Hinds sacked as education secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: David Gauke David Gauke resigned as justice secretary EPA Boris Johnson's cabinet: Who's in and who's out Out: Rory Stewart Rory Stewart resigned as international development secretary Getty Boris Johnson's cabinet: Who's in and who's out Out: David Lidlington David Lidlington resigned as deputy Prime Minister PA Boris Johnson's cabinet: Who's in and who's out Out: Philip Hammond Philip Hammond resigned as Chancellor of the Exchequer AFP/Getty

Lucila Granada, chief executive of Focus on Labour Exploitation (Flex), said: “Brexit is prompting a redesign of our immigration system. Undocumented people are at far greater risk of severe exploitation, including modern slavery offences. An amnesty for those without correct paperwork would provide vital protection.”

Omar Khan, director of the Runnymede Trust, said he was “not surprised” that the prime minister appeared to be shelving the plan, adding: “He supported amnesty in words, but like all politicians he should be judged for his actions.

“Current policy on undocumented migrants is a failure. Politicians may like the sound of talking tough, but they’re ignoring the obvious reality that current policy hasn’t been working for years, while continuing to cause harm to many people.

“It’s long past time for a grown-up, realistic debate and policy on undocumented migrants rather than blustering and posturing.”

Sonia Lenegan, head of legal policy at the Immigration Law Practitioners’ Association, said: “As we have seen with Windrush, it is difficult for people to provide evidence of their life in the UK when the hostile environment is designed to ensure that those without status are unable to get the paperwork the Home Office expects to see.”

She added that she was concerned by the “lack of consideration” in these announcements for the people who would be affected by such an amnesty, saying: “Every time this is mentioned, hopes are raised before inevitably being dashed again.”

Mr Johnson first advocated the creation of an amnesty for illegal immigrants as London mayor in 2008, when he announced that his office would consider the feasibility of granting an amnesty to an estimated 400,000 people living illegally in the capital.

Eight years later, as foreign secretary, he called for an amnesty for undocumented immigrants who had lived in the UK for longer than 10 years, saying this would be the “economically rational” thing to do as it would allow them to start working lawfully and contributing tax income.

The day after he became prime minister in July 2019, Mr Johnson was asked by Labour MP Rupa Huq whether he was a “man of his word” on his previous support for an amnesty.

He answered: “I do think we need to look at our arrangements for people who have lived and worked here for a long time, unable to enter the economy, unable to participate properly or pay taxes, without documents.

“We should look at the economic advantage and disadvantages of going ahead with the policy that she describes and which I think she and I share.”

Mr Johnson described as “anomalous” the current policy of deporting anyone who “doesn’t have the correct papers, and who may have been living and working here for many years without being involved in any criminal activity at all”.

“And we saw difficulties that that kind of problem occasioned in the Windrush fiasco. We know the difficulties that can be caused,” he added.

While many welcomed his comments at the time, others responded with anger, describing the idea of introducing an amnesty as an “absurd proposal”.

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

Following the exchange in the Commons, a parliamentary petition was created, calling on ministers to “rule out” any prospect of granting an amnesty on illegal immigration, and has since garnered more than 35,500 signatures.