A SEX predator who attacked a teenager in East Lothian when he was an overnight guest of her family was jailed for four years on Monday.

A judge told Kevin Cowley at the High Court in Edinburgh: "You gave no explanation for your behaviour but it is clear it was for your own sexual gratification."

Lord Boyd of Duncansby said: "It is clear this had a traumatic and lasting effect on your victim."

The judge told Cowley, 57, that he would be on the sex offenders' register indefinitely following his conviction.

Cowley, formerly of Easthouses, Midlothian, was originally charged with raping the 15-year-old girl but pleaded guilty to a charge of indecently assaulting her in a caravan in Prestonpans on May 21 last year.

During the assault on the sleeping girl, the first offender took off the victim's pants and molested her. DNA evidence showed that he had carried out a sex act on himself.

The court heard that Cowley had been out drinking in Leith and spent about £100 on alcohol before contacting the victim's family asking to spend the night at their home.

The victim went to her bedroom and fell asleep but awoke to find Cowley leaning over her.

Advocate depute Lynsey MacDonald said: "The victim could smell a strong smell of alcohol from the accused's breath."

Her pants had been removed and bra and t-shirt pulled up.

The prosecutor said: "She does not know what happened in the period before she awoke."

The girl panicked and got out of bed and pushed her attacker out of her way as she screamed, running to her parents' room.

She was extremely distressed and crying and complaining of pain.

Her mother remained with her while her father went and confronted Cowley, who was told to wait while the police were called.

Cowley was detained and during an interview did not deny that he had touched the victim.

Defence solicitor advocate Brian Gilfedder said: "He was drinking heavily before this incident which may have affected his judgement."

"It appears this was an impulsive and completely out-of-character incident," said Mr Gilfedder.

He said that Cowley had worked throughout his adult life and had largely "lived a pro-social lifestyle".

Following Cowley's sentencing, an NSPCC Scotland spokesman said: “This case is every parent’s worst nightmare.

"Cowley carried out a sickening attack which will have had a devastating impact on his young victim.

"Abuse ruins childhoods and it is vital she receives the support necessary to recover.

“Cowley clearly poses a risk to young people and this is reflected in the prison sentence he was given.

“Any adult concerned about the welfare of a child or young person can call the NSPCC helpline free, 24/7, on 0808 800 5000. Children can call Childline at any time on 0800 1111.”