An asylum seeker labelled a "serial offender" by a judge has been released from immigration detention after Home Office deportation attempts foundered.

Detail of the 31-year-old man's case has emerged in a ruling by Judge Martin McKenna following a High Court trial in London.

The man, who has a history of mental health problems and was not named in the ruling, claimed that he had been unlawfully detained and wanted compensation from the Home Office.

Judge McKenna dismissed the compensation claim but told how the man had arrived in the UK in 2003 and had been convicted of 17 offences over a seven-year period.

The judge described the man as a "serial offender" - listing convictions for attempted robbery, criminal damage, drug crime and shoplifting - and said he had been assessed as "posing a high risk of harm to the public".

But the judge said the man had been released late in 2015 - after being held in immigration detention for more than 10 months - following fruitless deportation bids.

Judge McKenna said the man, who had been born in a refugee camp in southern Algeria, claimed that he was "stateless".

He said Home Office staff had approached authorities in different parts of Africa - in a bid to deport - but officials had refused to provide travel documents to the man.