A teenager who sexually attacked a sleeping woman after a drink and drug-fuelled night out in Bradford had no recollection of committing the offence, a court heard.

Lawyers for Declan Staves explored the unusual legal defence of “automaton” in his case, meaning that he would not have been aware of his actions at the time.

But after a psychiatric report was prepared, Staves pleaded guilty to assault by penetration in June last year.

Staves, 20, of Ravenstone Drive, Greetland, Halifax, was 19 when he abused the woman while she was asleep on a sofa, prosecutor Stephen Wood told Bradford Crown Court today.

She woke at an address in the Bradford area to find Staves committing the offence.

She assumed he was too drunk to know what he had done because he was stumbling and intoxicated.

But the incident preyed on her mind, Mr Wood said, and she told her partner what had happened.

The police were alerted because she was concerned that Staves might commit sexual offences against other women.

He told investigating officers that he “wasn’t too sure” if he had committed the offence after consuming a mixture of spirits, beer and drugs on a night out in Bradford.

Mr Wood said the woman had since suffered sleeplessness and was on medication for anxiety.

Staves’ solicitor advocate, John Bottomley, said his client was just 19 at the time and intoxicated.

He had no memory of committing the offence and had been assessed as vulnerable by his psychiatrist and his probation officer.

Judge David Hatton QC said the offence was “a gross abuse” while Staves was drunk.

“The effect of such conduct upon a victim in these circumstances can be severe and long-lasting,” he said.

It was a serious matter that crossed the custody threshold, despite Staves’ lack of previous convictions.

Judge Hatton said that Staves would have been locked up for three years if he had been convicted after a trial.

But he had pleaded guilty after the defence of automaton had been explored by a psychiatrist.

The offence was over a year ago and he felt shame and remorse.

Staves was sentenced to two years in a young offender institution, suspended for two years, with sex offender treatment programme and rehabilitation activity requirements.

He must obey a three-month electrically monitored overnight curfew and do 240 hours of unpaid work.

Staves must sign on the sex offender register for ten years.