A “prolific and violent offender”, with more than 30 convictions to his name, has won almost £80,000 compensation for being "falsely imprisoned”.

The government has been told it must pay Somali criminal Abdulrahman Mohammed £78,500 after a judge ruled the Home Office kept him jailed for 445 days too long while trying to deport him.

The 39-year-old from Shepherd's Bush has been jailed on 13 occasions for crimes including affray, knife possession, multiple assaults and robberies.

Even the recidivist’s own lawyer admitted in court “he might not be considered an asset to society”.

Delivering his ruling at the High Court on Friday (November 10), Judge Edward Pepperall QC said he could “well understand why the Home Secretary might wish to deport” Mohammed, but that he had been “falsely imprisoned” and was “entitled to justice in a civilised society”.

He said Mohammed suffered torture and “unimaginable barbarity” when he was 13 and living with his family in the Somali capital Mogadishu.

His uncle was shot dead and a girl was raped in front of him, before thugs sliced through his cheeks with bayonets in a bid to cut out his tongue.

Mohammed was then “branded with a burning cattle prod” before his torturers told him, “remember us by this”.

After fleeing Somalia, he spent two years in a refugee camp before finally making his way to Britain in 1996, aged 17.

The case was heard at the High Court on Friday (November 10)

His account of the horrors he endured in his homeland was “rightly not challenged” and he had been left with a legacy of post traumatic stress disorder.

Mohammed “enjoyed the freedoms of western society” and slipped into life as “a habitual and violent criminal”, the court heard.

After being refused asylum upon entering Britain, he had been granted leave to remain - but only until August 2000.

In January 2008, the Home Secretary made a deportation order against him, but lawyers took his case to the European Court of Human Rights and the UK was ordered not to remove him from the country “until further notice”.

There was no prospect of deporting him, but he was kept in immigration detention for three periods between 2012 and 2016.

Home Office lawyers accepted at a late stage in the case he had been unlawfully detained for 445 days in total, the judge said.

They also “abandoned arguments the court should only award nominal damages”, he added.

Slamming the Home Office, Judge Pepparall said there was “clear independent evidence” Mohammed had been tortured, and that the government was guilty of “formulaic reasoning”.

“The Home Office’s own policy required it to release Mr Mohammed unless there were exceptional circumstances justifying continued detention," said the judge. “As the Home Office now concedes, there weren’t."

The judge continued: “Mr Mohammed is prolific and violent offender. I can well understand why the Home Secretary might wish to deport him.

“She has not, however, been able to do so, largely because of the very real risk that deportation to Somalia would pose.”

He admitted the compensation was likely to attract criticism, but said: “There are few principles more important in a civilised society than that no-one should be deprived of their liberty without lawful authority.”

Keep up to date with the latest news in west London via the free getwestlondon app.

You can even set it to receive push notifications for all the breaking news in your area

Available to download from the App Store or Google Play for Android now.