Hundreds of people who worked and lived in UK for years were told they had 14 days to lodge an appeal

They are teachers, doctors, scientists and engineers. Most have British-born children. Many have lived legally in the UK for a decade or more, but all are now on the verge of destitution, forbidden from working, using the NHS, renting property or receiving benefits.

Their offence? To have made legal amendments to their tax returns. For that, the Home Office has fought – often for years – to force them to leave the UK under a law designed, in part, to tackle terrorism and people judged to be a threat to national security.

A life 'completely destroyed' by one paragraph of immigration law Read more

Now a court ruling has shed light on a once obscure but, thanks to the Guardian’s extensive coverage, now-notorious paragraph 322(5) of the immigration rules. The appeal court found that the “general approach [by the home secretary, Sajid Javid] in all earnings discrepancy cases [has been] legally flawed” and must changeuse of . Paragraph 322(5) had been used to try to force 1,697 highly skilled people out of the UK in just over three years

The paragraph was not written to catch tax discrepancies; it was designed to tackle the UK’s most serious offenders. It says a person is deemed to be “undesirable … in the light of his conduct (including convictions …), character or associations or the fact that he represents a threat to national security”.

The court concluded that the Home Office proceeded directly from finding discrepancies in reported earnings to a decision that they were the result of dishonesty without giving people the opportunity to “proffer an innocent explanation”.

The government’s guidance on 322(5) makes clear how serious an offence needs to be for the discretionary power to be invoked: “The main types of cases you need to consider for refusal under paragraph 322(5) … are those that involve criminality, a threat to national security, war crimes or travel bans.”

The threshold is high because the consequences are severe: people refused under 322(5) have just 14 days to lodge an appeal or must leave when their current visa expires. They are ineligible for any other UK visa and are not allowed to return to the UK for 10 years.

Some are allowed to stay and appeal against the refusal. But this will cost tens of thousands of pounds and take years – often costing them their jobs, homes, savings and, in some cases, their health and that of their children. This is because, once a visa application is refused under paragraph 322(5), people are not allowed to work, rent property or access the NHS. They are not entitled to asylum support or mainstream benefits, nor are they allowed to open a bank account or hold a driving licence.

In a short space of time, people – most of whom have been paying high rates of tax, running British companies, employing British workers and contributing to society – become destitute. In some cases, they have sold everything they owned to pay for life-saving healthcare for their British-born children. More than one told the Guardian: “It’s like they’re trying to starve us out.”

These families feel they have no choice but to stay and fight because leaving the UK under paragraph 322(5) means they are highly unlikely to get a visa to visit or work anywhere in the world ever again.

'I feel like I'm drowning': healthcare inspector faces deportation by Home Office Read more

The stories the Guardian reported on included a wide range of professionals: a specialist computer programmer; a pharmaceutical specialist who came to the UK to help develop anti-cancer and anti-psychotic drugs, and an engineer who trained others for the Ministry of Justice. They included families who were struggling to deal with serious illness: the two British-born children with lifelong, complex physical and mental disabilities; a seriously ill Nigerian woman who had to beg for the right to work so she could afford the medication she needed to stay alive while appealing against 322(5); and a widower, forbidden from working, who was the sole carer of his four-year-old involved in a case that even the Home Office’s lawyers advised it to drop.

No one the Guardian spoke to had committed a crime. What they had done was follow the HMRC’s guidance that “both HMRC and its customers can exercise their right to correct, adjust or amend a filed return”.

HMRC did not consider that a crime – or even a mistake requiring a punitive fine – occurred in any of the cases the Guardian investigated.

As further 322(5) stories were published, politicians began to take notice. Lord Taverne, a former financial secretary to the Treasury, accused the Home Office of presiding over “a national scandal, every bit as outrageous as the treatment of the Windrush immigrants”.

In a meeting of the same home affairs select committee, the Labour MP Naz Shah told the home secretary, Sajid Javid, that the use of 322(5) “smacks of the Windrush scandal”.

The government scrambled to limit the damage. Javid promised a review but increasing numbers of MPs were discovering they had constituents fighting paragraph 322(5) rulings. The Scottish National party MP Alison Thewliss, having found she represented at least five highly skilled migrants in such circumstances, called a debate in Westminster Hall on the issue.

Engineer deemed security threat over tax error gets visa in Home Office U-turn Read more

Finally, in November, the government was forced to publish its long-awaited review. It revealed that between January 2015 and May 2018, the Home Office had wrongly tried to force at least 300 highly skilled migrants to leave Britain, with a further 87 having already left and another 400 potentially affected.

Despite public condemnation and the findings of its own review, refusals under 322(5) continued. In the background, however, the courts were quietly overturning case after case until the government had to admit that 65% of 322(5) appeals were successful – a rate that is a third higher than immigration appeals overall.

Eventually, the court of appeal, realising it was seeing increasing numbers of appeals against 322(5), linked four different cases together. Campaigners hope the ruling will finally deal a hammer blow to the government’s use of paragraph 322(5) against highly skilled migrants.

• This article was amended on 19 April 2019 to more fully explain and quote from the appeal court’s ruling and to correct an earlier version which suggested that some of those refused under paragraph 322(5) had 14 days to leave. That should have said “14 days to lodge an appeal”.