Joseph Mjemer, 36, has been jailed for 11 years for attempting to rape a 'completely inebriated' stranger

An illegal immigrant who received £17,000 compensation for his unlawful detention was jailed for 11 years yesterday for attempting to rape a stranger.

Joseph Mjemer, 36, attacked the woman in her flat on New Year's Day after meeting her in Carlisle city centre when she was 'completely inebriated'. She woke up to find him trying to rape her.

But Judge Paul Lawton ruled that he should not be classed as a dangerous offender and imposed an 11-year jail term rather than an indeterminate sentence.

It means Mjemer could be released on licence in five-and-a-half years' time, after he has served half his jail term.

The judge, sitting at Minshull Street Crown Court in Manchester, said the question of whether Mjemer should be deported after he has served his sentence 'is a matter for the Home Office and not this court'.

Mjemer was the subject of a deportation order, signed in April, but is appealing against it.

Rachael Landin, defending, said he was effectively 'stateless, which means he cannot be deported'.

The court was also told that Mjemer, who was once described as a 'one-man crime wave' by another judge, had a total of 64 previous convictions and almost two dozen aliases.

He was acquitted of two charges of rape by a jury, but convicted of attempted rape.

Judge Paul Lawton (pictured) ruled that Mjemer should not be classed as a dangerous offender

Judge Lawton said: 'It must have been obvious she was completely inebriated. It is quite clear that you treated her as a sexual object for your own gratification with no regard for her feelings and emotions.'

The judge added: 'You have led a nomadic lifestyle in the UK.'

Lawyers for Mjemer have claimed at previous hearings that he was brought up in Algeria, but it is unclear what nationality he is.

In 2011 the High Court awarded him £17,360 in compensation after it ruled he had been wrongly imprisoned for five months in 2007 as officials tried to determine where he came from.

Jurors at Manchester's Minshull Street Crown Court (pictured) found Mjemer not guilty of two charges of rape but guilty of attempted rape

He had arrived in the country illegally as a stowaway on board a ship in 2003 and was held at the time by Home Office officials.

But Mjemer went on to commit 20 offences in the three years after his arrival and was jailed several times before he was taken into 'administrative custody' in 2007.

A Home Office spokesman said: 'We aim to deport all foreign national offenders at the earliest opportunity and have removed over 48,000 since 2010. However, we cannot always return [them] to their home countries immediately because many barriers to removal may arise.'