The ruling could hardly be more damning. It found Theresa May deported thousands of students from Britain on the basis of unscientific hearsay evidence. The Home Office behaved like a tin-pot dictatorship: detaining innocent people, accusing them of made-up charges without providing anything to back it up, denying them their day in court and then deporting them.

Today's ruling could open the doors to the return of thousands of students to the UK, if – of course - they wish to come back to a country which has treated them so appallingly. And it brings to a shuddering halt Theresa May's mass deportation programme of students. It also raises serious questions about the legal and operational functions – as well as the basic morality – of the Home Office.

The story starts on February 10th 2014. That evening, Panorama broadcast a programme on fraudulent language tests being taken at a single school in east London. The language tests are part of a system requiring immigrant students to prove their English is up to the required standard.

The Home Office response was extraordinary. Instead of treating this as evidence of cheating in one school, it claimed that everyone who had taken the TOEIC test, written and conducted by American firm ETS, had committed fraud.

There were several problems with this theory. Firstly, the reason most students had taken this test specifically was because the home secretary had made ETS an accredited body of the immigration rules. These students had been funnelled into what now looked like a Home Office trap.

Secondly, there was no evidence they had cheated. The Panorama programme showed evidence of fraud in one school. Its journalists were baffled by how the Home Office suddenly claimed everyone across the country taking the test had cheated.

Then people started being rounded up. Families were woken in dawn raids, the husband separated from the wife and sent to detention centres ahead of deportation. It would have been a profoundly harrowing experience. These were students, not criminals. Their only crime had been to do a test recommended by the Home Office. But the full sadistic force of the state was brought down upon them.

Students were accused of fraudulently passing the exam

"They're picking them up and taking them to detention centres with only the clothes they're wearing," a solicitor representing several of the students told me at the time.

"They come anytime between 4am and 8am, in a group of 18 to 20 people. It's about three vehicles full of the immigration officers.

"My client was crying on the phone. When they take the warrant to the magistrate, do they tell them a group of 20 people will go pick up a student who is not a threat? A student who is being treated like weapons have been found at his house?

"One of my clients was part of a couple. I had to get them out the detention centre. The husband was put in one place and the wife in another. They said male and female must be put in different places."

These students were not entitled to see the evidence against them. They were not entitled to appeal, except out of country. They were branded liars and cheats and thrown out without their day in court.

There is a good reason the Home Office would not show them the evidence: it did not have any which was reliable enough to withstand even the most superficial level of legal scrutiny. Its proof of the fraud came from a visit by a couple of its officials to the US, where they went to see ETS. The firm told them it had special new voice-testing software which had detected tens of thousands of fraudulent language tests. It alleged these must have been done by test surrogates. It even claimed to had had humans verify these software results, in batches of the tens of thousands. Or at least, that's what the Home Office says they said. We don't know what really happened, because ETS won't release any information.

Then along came Dr Harrison, an expert in voice recognition. To him, none of this made any sense at all. So he went and demolished the Home Office's case in court.

Today's ruling, by the upper tribunal's Mr Justice McCloskey, found his testimony was "balanced, measured and truthful, containing no hint of exaggeration or conjecture". He "raises profound questions about the witness statements of the secretary of state's officials and the information emanating from ETS". The Home Office's response to his comments "failed to deal with the main criticism satisfactorily or at all". The doctor was "unshaken in cross examination".

It was a very different assessment to that of Rebecca Collings and Peter Milinton, the officials from the Home Office sent to defend May's reputation. This pitiful pair has been used to justify all the thousands of deportations, with their witness statements about ETS and vague assertions of everything being done in a rigorous manner.

Tribunal ruling a disaster for Theresa May

But when it finally came for them to give an account of themselves to the tribunal, Mr Justice McCloskey found neither of them had "any qualifications or expertise, vocational or otherwise, in the scientific subject matter of these appeals". At no time, in fact, had the Home Office had advice or input from a suitable expert. The criticisms of their witness statements "were not addressed, much less answered, in their evidence".

The Home Office's case that these students had committed fraud was "entirely dependent" on ETS. The tribunal found the Home Office accepted uncritically everything reported by the firm.

But here's the thing: ETS didn't actually bother to come to the tribunal. There was no ETS witness. It provided no evidence, either directly or indirectly. It was not even prepared to send the voice recording of the two people taking the case to the tribunal. Even at this stage, when the tides had turned firmly against ETS and the Home Office, they were not able to see the evidence against them.

Mr Qadir, who brought the case, had been on a short holiday abroad when he returned to the UK to find himself branded a liar and put in detention. But contrary to the Home Office witnesses, Mr Justice McCloskey found his evidence "impressive in its entirety".

He added: "We found no indication of invention, exaggeration or evasiveness". Under cross-examination he answered questions in a "careful, pensive fashion". In a telling aside which seems aimed more at the Home Office than Mr Qadir, the tribunal president said he "at all times sought to engage with the tribunal and clearly realised the importance of telling the truth". It goes without saying that he spoke excellent English.

The appellants were "clear winners", the tribunal found.

Home affairs committee chairman Keith Vaz was there this morning, waiting outside of court, celebrating with those who campaigned for the case and congratulating the legal team. The pressure is now on for a parliamentary inquiry into what happened here.

How did the Home Office get to the point where it started deporting innocent people on the basis of unreliable hearsay evidence and without any proper judicial remedy? Why did the home secretary breach her duty of candour with those being accused of fraud? How is a private firm contracted to do public service work for the UK government issuing fantastical information to the Home Office? Why is it getting away with shutting up shop and refusing to comply with a tribunal? How did the Home Office end up being completely reliant on a foreign private contractor in the first place? And what is the home secretary going to do to contact the people who were unlawfully removed from this country so that they can now return to the UK?

For now, the unlawful deportations have stopped. But this case raises serious questions about the culture and morality of the Home Office and the people in charge of it.

A Home Office spokesperson said:

"The government continues to tackle abuse of our immigration system and protect the reputation of our world class education institutions.



“The investigation into the abuse of English language testing in 2014 revealed extremely serious, large scale, organised fraud.

“We are very disappointed by the decision and are awaiting a copy of the full determination to consider next steps including an appeal. It would be inappropriate to comment further at this stage.”