A man who was part of a group which lured girls to a house for sex cannot be deported because he is a member of a "persecuted tribe".
Jumaa Kater Saleh (24) went to the High Court in a bid to claim damages for unlawful detention during the Government's failed bid to send him back to Sudan.
Saleh, who is now living in Leicester, was sentenced in May 2008 to four years in a young offender institution for sexual activity with a female under 16.
The judge described how Saleh, who arrived in the UK in 2004 hidden in a lorry, was one of five immigrants who had lured girls to a house for sex. Three were aged 13 and one 14.
Saleh was convicted of two sample charges of sexual activity with a 13-year-old and sentenced on the basis they were planned offences and he knew the girl's age.
In addition to a custodial sentence, the judge recommended him for deportation.
The court heard Saleh's application for asylum was refused in January 2005.
Because he was a minor, he was granted discretionary leave to remain in the country until his 18th birthday in October 2006.
Later, he applied for permission to stay, but in May 2007 he was arrested.
When he became eligible for release after serving his sentence, he was detained under the 2007 Borders Act pending moves to deport him "for the public good".
He was eventually released from immigration detention in May 2011 after it was established that, under human rights laws, he could not be deported to Sudan because of the risk of persecution.
Saleh asked Deputy High Court judge Philip Mott QC for a declaration he had been wrongfully detained, entitling him to damages.
The judge, sitting at London's High Court, said it was now accepted Saleh was a member of the Zaghawa tribe which was subject to widespread persecution, and it was "not possible" to return him to Sudan.
But Judge Mott ruled there was no evidence of him being held unlawfully or unreasonably and ruled that his case failed "on all grounds".