A Sudanese man jailed for sexually assaulting a schoolgirl has won thee right to seek compensation after he was held in custody following unsuccessful attempts to deport him.

The Court of Appeal ruled that Jumaa Kater Saleh had the right to damages for being held for eight months after serving a four-year criminal sentence in a young offenders' institution.

The 25-year-old was part of a gang of five men who lured under-age girls to a house for sex. Originally from the Dafur area of Sudan, the Home Office had taken too long to deport him.

"His past criminal offending, of itself, cannot be any justification for implementing or extending his time in immigration detention," the court ruled.

The appeal judge said the eight months additional detention was "unreasonable and unlawful". Administrative delays by the Home Office were unaccounted for. It was later decided that he could not be deported on human rights grounds.

The judge said Saleh had arrived in the UK in 2004 hidden in the back of a lorry. He was discovered by immigration authorities at the age of 16 and claimed asylum because he was a member of the Zaghawa tribe. He said he would suffer intolerable treatment if forced to return.

His asylum claim was rejected in 2005 because of its vagueness but was allowed to remain in the UK until his 18th birthday in October 2006.

Saleh made a further application to remain in the UK and was arrested and charged with serious sexual offences against children in May 2007.

Home Office 'disappointed'

He was kept in custody from the date of arrest and sentenced to four years in May 2008. He was released from his sentence in May 2009 but was detained for another two years over deportation considerations.

The Home Office was unable to explain why he was detained for eight months of the two years

The judge ruled: "It is plain to me that at least two thirds of the 12 month period, and therefore eight months, can only be seen as falling on the unreasonable side of the line, and I would therefore hold that eight months of the total period of 15 months in immigration detention was unreasonable and therefore unlawful."

Saleh, who now lives in Leicester, won the appeal against an initial ruling by Deputy High Court judge Philip Mott QC in January this year.

If a cash sum cannot be agreed between the Home Office and Saleh's lawyers, the figure will be decided by London's High Court.

A Home Office spokesman said it will appeal against the ruling: "We are extremely disappointed with the court's decision. We believe it is right that dangerous individuals are kept in detention, wherever possible, in order to protect the public.

"We will continue to seek to deport individuals who show a complete disregard for the laws of this country."