"He only made admissions to his guilt when he knew all other avenues were shut to him.

"Only then did he provide a written apology with a view to improving his position."

Dr Ernest Gralton told the court the defendant was on the "mild end of the autistic spectrum".

He added: "Many people with autism have learning disabilities but his IQ is the normal range of about 80."

The court heard the defendant suffers from a personality disorder and has difficulty socialising and communicating.

Dr Gralton concluded: "The combination of all these issues would meet the criteria for a mental disorder."

Both Dr Gralton and Dr Ashimesh Roychowdhury recommended the defendant be detained in a hospital because he would get more support.

The court heard that Dr Roychowdhury concluded he posed a "continued risk of further sexual assaults against adult females".

'So sad and very upset'

Rina-Marie Hill, defending, told the court: "He [the defendant] has committed truly terrible offences, of that there is no doubt.

"The best way to manage the risk s to treat him, and a better environment at which he should be treated would be a hospital.

"He would be vulnerable in a secure unit such as a young offenders' institution.

"There's every hope that the risk will be diminished but until it is diminished he is not going to released.

"I would urge caution in departing from the medical opinion of two doctors."

But Judge Lucas, while acknowledging the guilty plea and the defendant's lack of maturity, refused to pass a hospital order and instead ordered that he be detained.

The judge said he had seen nothing that "calls for a really serious case to be dealt with in a manner which is significantly different".

In a statement read out in court, the victim said: "When I see a small group of young lads, I get scared

"I have nightmares that someone is going to grab me or jump out in front of me.

"I feel because of what happened to me that I should die.

"I feel so sad and very upset. The incident has made my life very miserable because of over-thinking what has happened to me."

Following the sentencing, Detective Constable Annette Bridge, from the Surrey and Sussex Major Crime Team, said: "The boy not only planned his attack but then initially denied his guilt by providing two different and clearly thought-out defences which were totally untrue.

"Not once throughout the investigation did he show any genuine remorse and he only pleaded guilty when the weight of the evidence literally left him with nowhere else to go.

“I would like to pay tribute to the victim for her bravery throughout the investigation, and although she was spared from giving evidence in court she had to endure a lengthy procedure in which she provided numerous statements and medical samples and had to participate in an identification parade."