The judge described how Saleh, who arrived in the UK in November 2004 hidden in a lorry, was one of a group of five immigrants who had lured schoolgirls to a house for #######, two of whom were aged 13 and one 14, and unprotected intercourse took place.
The judge said Saleh was convicted of two sample charges of sexual activity with a 13-year-old girl, and he was sentenced on the basis that they were planned offences and he knew the girl's age.
The trial judge had remarked that all three girls were ''clearly disturbed and vulnerable, far from mature for their years and had been targeted by the group''.
In addition to the substantial custodial sentence, Saleh was recommended for deportation.
His application for asylum had been initially 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 in the country longer. But in May 2007 he was arrested and charged with the ####### offences.
When he became eligible for release after serving his sentence, he was further detained under the 2007 Borders Act pending moves to deport him ''for the public good'' because of the seriousness of his criminal offences.
He was eventually released from immigration detention in May 2011 after it was established that, under human rights laws that protect against inhuman and degrading treatment and risk to life, he could not be deported to Sudan because of the risk of persecution.
Today Judge Mott ruled that the refusal to release him earlier on bail pending a final decision on whether or not he could be deported was reasonable, given the nature of his offences.
The judge said: ''It was deliberate, targeted abuse of a young and vulnerable girl.
''The risk that the claimant, in his early 20s, would commit a further sexual offence if released on a precarious basis at risk of return to Sudan had to be considered as substantial.''
The judge rejected submissions that Saleh could have been released because bail conditions and the requirements of him being on the ####### Offenders' Register would have provided safeguards.
The judge ruled: ''The experience of the criminal courts is that these have a very limited ability to prevent or deter re-offending.''