An asylum seeker who was deported to Afghanistan despite being threatened with beheading by the Taliban is to be flown back to the UK following a lengthy court battle.

Samim Bigzad has been waiting to hear his fate in a hotel in Kabul as his legal representatives took the Home Office to court to overturn his deportation.

But he is expected to be returned to London on Sunday morning after the Court of Appeal threw out the Government’s attempt to keep him in Afghanistan.

A High Court judge had warned that the Home Office’s actions constituted a “prima facie case of contempt of court” after it violated a previous order.

The Home Office initially attempted to deport Mr Bigzad in August but was thwarted when a Turkish Airlines pilot refused to take off from Heathrow with him on board.

The pilot blocked G4S guards attempting to force the 22-year-old onto the plane after campaigners alerted passengers and crew to his plight.

Mr Bigzad was taken back into detention until Tuesday, when relatives were told he was to be deported with less than four hours’ notice.

His legal representatives secured an emergency injunction as he was held awaiting a connecting flight in Istanbul that night, which required the Home Office to return the asylum seeker to the UK pending a judicial review of his case, but he was instead put on the plane to Afghanistan.

Samim Bigzad claims to be a target for Taliban militants

In a second order issued by the High Court on Wednesday, Justice Jay said the Government must “take all steps available to procure [Mr Bigzad’s] immediate return to the United Kingdom”.

The document, seen by The Independent, said he must be put on the next available commercial or chartered flight with space and gave the Home Office until 4pm on Friday to present a witness statement explaining its actions.

But no explanation emerged, and a third order was issued from another High Court judge, who threw out Home Office attempts to overturn previous rulings and keep Mr Bigzad in Kabul.

Justice Lang wrote that the Government must secure his “immediate return to the United Kingdom from Kabul” at any cost.

“Whatever the merits of the claim for a judicial review, and even if Justice Morris erred in granting a stay on removal, [Mr Bigzad] ought not have been removed from the UK in breach of an order of a high court judge and so he must returned,” she added.

“He is now entitled to remain in the UK at least until the legal issues have been resolved.”

On Friday evening, the asylum seeker’s legal team were notified that he would be returned to the UK on a flight departing Kabul early on Sunday morning.

But the following day, the Home Office launched another application to keep him in Afghanistan.

After a four-hour hearing at the Court of Appeal, Mr Bigzad’s lawyers said the Government’s efforts had been defeated and he would be flown back to London.

Kabul suicide bombing kills at least 24 and leaves 40 injured

Jamie Bell, a solicitor with Duncan Lewis Public Law, said the Home Office had acted “unlawfully” in breaching High Court orders and that a contempt of court action would be brought.

“This is the first step of Samim’s new legal battle and we now begin the fight for him to be allowed to stay in the United Kingdom,” he added. “We urge the Home Office not to detain Samim on return.”

He has been held at the Brook House immigration detention centre near Gatwick, where the abuse of migrants has been exposed by undercover footage.

MPs grilled G4S directors over the scandal, exposing drug use, self-harm and suicide attempts, at a Home Affairs Committee hearing on Friday.

Managers said they were “ashamed” of the footage and had launched an independent review, as well as complying with a police investigation.

But campaigners said the case is not isolated in the UK’s immigration detention system, where vulnerable asylum seekers like Mr Bigzad can be held indefinitely.

Mr Bigzad’s initial application for asylum was refused last year and was detained without warning during a routine immigration appointment in July.

He fled Afghanistan in 2015 after being threatened with beheading by Taliban militants, who targeted him because of his work for a construction company that had contracts with the Afghan government and American military.

Islamist insurgents have launched frequent attacks on “puppets” accused of colluding with their enemies, amid a rise in conflict and terror attacks in Afghanistan.

Kabul bomb blast kills at least 90 people Show all 13 1 /13 Kabul bomb blast kills at least 90 people Kabul bomb blast kills at least 90 people A man reacts in shock after a suicide car bombing in a diplomatic zone of Kabul, Afghanistan, left at least 80 people dead Reuters Kabul bomb blast kills at least 90 people The Taliban has denied responsibility for the deadly suicide car bombing that set more than 50 cars alight Reuters Kabul bomb blast kills at least 90 people Two Afghan men carry one of the many injured in the attack REUTERS Kabul bomb blast kills at least 90 people A man tries to drive his vehicle heavily damaged in the blast AP Kabul bomb blast kills at least 90 people Two men walk away from the scene, covered in blood REUTERS Kabul bomb blast kills at least 90 people The bomb was detonated near the German embassy in the city’s heavily guarded diplomatic district REUTERS Kabul bomb blast kills at least 90 people One of many cars destroyed in the attack burns Reuters Kabul bomb blast kills at least 90 people The attack sent plumes of smoke over Afghanistan’s capital AP Kabul bomb blast kills at least 90 people Several buildings have been damaged in the blast AP Kabul bomb blast kills at least 90 people The car bombing is thought to be one of the most deadly attacks ever to hit the capital Alamy Kabul bomb blast kills at least 90 people Wounded victims lie on their beds in Wazir Akbar Khan Hospital in Kabul AP Kabul bomb blast kills at least 90 people Relatives of Afghan victims mourn outside a hospital after the blast in Kabul Reuters Kabul bomb blast kills at least 90 people Crowds in Kabul survey the damage after the deadly attack EPA

The Independent has seen evidence including contracts, tax returns and rental agreements that support Mr Bigzad’s claims.

“I escaped from my country because I was targeted by the Taliban and I am scared to go back,” Mr Bigzad said last week. “I just need a chance for the Home Office to save my life.”

The young asylum seeker had hoped to build a life in the UK, where he has been living in Margate, Kent, while learning English and acting as the primary carer for his father – a British citizen.

Allan Briddock, an immigration barrister from One Pump Court, said the treatment experienced by Mr Bigzad is not uncommon.

He told The Independent the Home Office frequently tries to deport asylum seekers “over and over again”, while seeking to minimise ways to resist removals.

“Lawyers used to be told the exact time and date but in the last kind of year they’ve introduced a removal ‘window’ lasting for three months, and once it starts you have no way of knowing at what point they’ll try to remove you so it leaves people in a really precarious position,” Mr Briddock added.

“You can’t get injunction because the judges say there’s not an immediate threat.

“It reduces a person’s right for access to lawyers and for proper judicial process in the case.”

Humanitarian organisations have appealed for the British Government to halt deportations to Afghanistan, where it announced it would be sending more troops to fight the Taliban earlier this year.