A SEX attacker who carried out an assault on a sleeping woman that left her in excruciating pain was jailed for three years today (Thursday).

A judge rejected a plea to spare Jack McInally a prison sentence after he was earlier convicted of the penetrative attack on his 21-year-old victim.

Judge Norman McFadyen was referred to a recent English appeal court decision telling judges to keep in mind the impact of a custodial sentence during the current coronavirus emergency.

Prisoners are spending longer in their cells and not receiving visitors during the outbreak.

Defence solicitor advocate John Keenan said: "In my submission that is a factor which I would invite my Lord to take into consideration, particularly in reaching a decision on whether custody requires to be imposed in this case."

Judge McFadyen told McInally at the High Court in Edinburgh: "This was a serious sexual offence. I am satisfied no alternative to a custodial sentence is appropriate in your case."

The judge said the offence was aggravated by being carried out on a sleeping woman who considered she was safe after a night out.

He said it had caused her excruciating pain and to wake up and level an accusation against McInally.

The judge said: "On your behalf it is pointed out you are a first offender, in employment and have good character references."

McInally was placed on the sex offenders' register for an indeterminate period.

McInally (25) of Phillimore Square, North Berwick, was earlier found guilty of assaulting the woman to her injury at a house in the East Lothian town on March 24 in 2018.

He pulled down her lower clothing while she was sleeping and carried out a sex attack on her.

Mr Keenan accepted that it was a serious offence but argued that the offence could be dealt with other than by imposing a prison sentence.

He said: "He comes before the court with no history of previous offending."

He pointed out that the offence occurred more than two years ago and there has been no other offending.

Mr Keenan said McInally was in full-time work and was regarded as a valued employee.

He said McInally's partner has increasingly relied on him because of a medical condition.

Mr Keenan said that although the victim was under the influence of alcohol there was no suggestion of her being plied with drink or drugs in order that the offence could be committed.

He said that McInally continued to deny committing the attack, but accepted she was assaulted.

He added: "His position is that was by someone else."

Mr Keenan said: "He is assessed at being a low risk of general offending and it is also accepted he could be managed in the community."