Kweku Adoboli, the banker convicted of the UK’s biggest fraud, has been given a last-minute reprieve from deportation as a judge awarded a judicial review of his case.

Adoboli, 38, was found guilty in 2012 of fraud that lost his employer UBS $2.3bn (£1.8bn), and he was due to be deported to Ghana on Tuesday. He was facing deportation because he had never applied for British citizenship despite having lived in the UK since he was 12.

Under UK law, if a foreign national has been sentenced to more than four years in jail “the public interest requires deportation unless there are very compelling circumstances”. Adoboli, who left Ghana when he was four, was sentenced to seven years for the fraud and served half that time.

Adoboli’s deportation appeared all but sealed earlier on Monday when the immigration minister, Caroline Nokes, refused to intervene to review the deportation order, despite appeals from 132 MPs and a petition signed by more than 73,000 people.

Nokes said the decision to deport Adoboli had been “upheld independently, at several stages, by the courts” and it would be inappropriate for her to act.

With the hours ticking down to his departure, Adoboli’s lawyers submitted an application for a judicial review of his case in a last-ditch attempt to prevent his “banishment” from his friends and family in the UK.

Adoboli had already had an application for judicial review rejected by the courts, and his lawyers were not confident the final attempt – made on public interest grounds – would succeed. But a judge granted the appeal for judicial review and injunction against deportation.

Adoboli’s lawyers expect him to be freed from an immigration removal centre near Heathrow airport within days and released on bail until the outcome of the judicial review, which could take several months.

Adoboli’s lawyer, Jacqui McKenzie, said: “Common sense has broken out: sending a 38-year-old man to a country where he has not lived since the age of four was always madness, given that he has lived in Britain since the age of 12 and the UK is where his friends and partner live and where his family life is based. It is unquestionably his home. Let’s hope that will be the judgment, as and when it is made.”

Hannah Bardell, Adoboli’s MP, who had led a campaign to keep him in the UK, said on Twitter: “A really incredible result, we never gave up hope and we’ll keep fighting!”

In explaining her decision not to intervene to prevent the deportation, Nokes said: “Although Mr Adoboli’s offence was not one of violence, he committed a serious offence and this was reflected in the length of his sentence. Financial crime, like all crime, has an impact on the society that we live in and the public expects robust action to be taken against foreign nationals who abuse our hospitality by committing crime.

“After consideration of all the individual circumstances of his case, the Home Office was satisfied that Mr Adoboli’s case does not meet any of the exceptions in the 2007 [Borders] Act and a deportation order was served on him on 22 July 2014. The decision to deport him has been upheld independently, at several stages, by the courts. His application to appeal to the court of appeal was dismissed on 28 June 2018 and on 13 August his application for a judicial review was refused.”

Nokes said the government was “committed to a fair and humane immigration policy” and she rejected the suggestion that Adoboli’s treatment was similar to that of the Windrush generation of immigrants.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

“The Home Office recognises the weight of dissatisfaction towards the treatment of the Windrush generation and officials are working hard to put this right,” she said. “I do not believe that the issues faces by the Windrush generation, who were legally resident in the United Kingdom but did not have the documentation to prove it, are analogous to Mr Adoboli’s case.”

Nokes has previously blocked at least two British citizens on Twitter when they asked for her assistance after the Home Office failed to respond to their complaints or appeals from their MPs.