The Home Office has abandoned its plan to deport an NHS doctor who has lived in the UK for 18 years, after its decision to throw her out sparked a furious backlash.

Dr Mu-Chun Chiang will now be able to stay in the country and undertake the three years of training she began in August to become an NHS GP.

“I’m happy and relieved but also frustrated that I have been put through this,” said Chiang, who last Friday was told she had to leave the UK within 14 days or face arrest and detention.

“The fact that the Home Office are backtracking now surely shows that there was a flaw in their processes. I’ve been angry, but overall it’s a positive outcome.”

Chiang, 27, was born in Taiwan but has lived, studied and worked in Britain for 18 years. She had to immediately stop working at a hospital in Liverpool – the first part of her GP training – as soon as she became aware that she was being thrown out of the country.

The Home Office’s decision to deport her for a minor breach of the visa application rules sparked outrage among medical groups. They warned that such a harsh and “ludicrous” application of the immigration regulations would deter overseas doctors from coming to Britain to work in the understaffed NHS.

The Home Office rejected Chiang’s application for a tier two work visa to cover the three years of her GP training from now until 2022, which is being paid for by Health Education England, the NHS’s staff training agency.

Those seeking a tier two visa must be able to prove they have held at least £945 in their bank account for 90 consecutive days up until a month before they submit their application.

But while Chiang had enough money in her savings account, she submitted statements relating to her current account, the balance of which dipped below £945 for some of the 90-day period.

The Royal College of GPs (RCGP) fears that Chiang’s case may be “the tip of the iceberg” of foreign-born doctors who encounter problems obtaining either a visa or a visa renewal, often because of small errors in their application.

The Home Office performed its U-turn soon after Prof Helen Stokes-Lampard, the RCGP’s chair, wrote to Priti Patel, the home secretary, asking her to intervene in Chiang’s case.

“At a time when the NHS workforce is in crisis, it is deeply concerning that this government is still willing to deport a doctor that this country has already invested in, who has lived here for most of her life and studied medicine here. Her skills and expertise are direly needed.”

She urged Patel to instigate urgent “reform of the visa and immigration system for medical professionals if we are to have a hope of the NHS, which has long been held up by the diverse range of people from all over the world, survival”.

Stokes-Lampard added: “This is not the first case that we have heard of like this, and I suspect that this is the tip of the iceberg when it comes to GPs or other vital members of the NHS workforce who are being let down by a system that is willing to deport hard-working people who have trained in the NHS for many years and helped save the lives of countless patients.”

EveryDoctor and the Doctors’ Association UK had also criticised the planned deportation as “ludicrous”, and proof that the government’s “hostile environment” approach to immigration was continuing, even though Theresa May – its architect – was no longer in power.

A Home Office spokesperson confirmed the U-turn, saying: “Following reconsideration of this case in light of additional evidence supplied by Ms Chiang, we have now contacted her to confirm her leave to remain.”

In an email to Chiang a Home Office official said: “I would like to confirm that we have exceptionally reviewed the decision taken on your Tier 2 General Worker Leave to Remain application submitted on 19 June 2019 based upon new evidence submitted after the decision was made. Thank you for your application which has now been approved.”