A Sri Lankan asylum seeker who says he was tortured in his home country has been awarded nearly £20,000 in damages from the Home Office for his unlawful detention.

The man, referred to only as KG for legal reasons, was unlawfully held in immigration detention for 30 days between January and February 2016 because of a failure to arrange a medical examination within 24 hours of his admission.

A judge sitting at the High Court in London has now awarded him a total of £19,500.

Ruling on the sum to be paid to the 29-year-old, Judge Alison Foster QC said there was "independent medical evidence consistent with what he says about his treatment in Sri Lanka" and found that KG was "vulnerable upon his detention in January 2016".

She said KG's "mental vulnerability was exacerbated during the course of his detention".

KG says he was tortured by the Sri Lankan authorities because his brother was a member of the Tamil Tigers, a militant Tamil nationalist group, before he fled to the UK on a student visa in 2011.

A doctor who eventually examined KG found that scars on his right wrist and ankle were "consistent with his history of torture", a conclusion which was supported by a second medical report produced after KG's release.

At a hearing at the High Court last week to decide on the amount to be awarded, KG's barrister David Lock QC said there had been a "lamentable failure ... to appreciate the vulnerability and fragility of the claimant as an asylum seeker".

Under the Detention Centre Rules, all detainees must be given a physical and mental examination by a doctor within 24 hours of admission.

The rules also require the doctor to provide a report on whether a detainee may be a victim of torture or whether their health is likely to be seriously affected by continued detention.

Mr Lock said KG's case was "yet another case which demonstrates systemic breaches of compliance" with the need for an examination within 24 hours of admission.

He conceded that KG "was detained perfectly lawfully - he was an overstayer", but added that he "ought to have had a medical examination arranged for him within 24 hours at his first place of detention" - at Campsfield immigration removal centre near Oxford.

The barrister said KG was subsequently moved to Harmondsworth immigration removal centre, "which, of course, is right beside Heathrow" and which contributed to his fears that he was going to be imminently returned to Sri Lanka.

KG, who had "mental health problems and who was gripped by fear that he was about to be put on a plane to go back to the place where he had been tortured", should "never have gone to Harmondsworth", Mr Lock said.

He added that KG, who claimed asylum while in detention, "has still not had his substantive international protection interview", which should be conducted within six months, meaning "he has been left in limbo for the last two-and-a-half years".