A judge has ordered a risk assessment on a violent rapist who attacked a property worker while she was inspecting his home.

Keith Stevenson was convicted of raping the victim at his home in Gorebridge, Midlothian, on March 18, 2015, after a trial earlier this year.

Stevenson was due to be sentenced at the High Court in Glasgow on Thursday but Lord Kinclaven called for more information about the danger he could pose to the public.

Lord Kinclaven told Stevenson: "Given the fact you have two High Court convictions and the nature of this offence I am going to ask for a detailed report in relation to risk."

Stevenson attacked the woman as she was about to leave his home, grabbed her by the neck and forced her into a bedroom. She told Stevenson she was pregnant but he told her to shut up and raped her. He also threatened to kill her.

The victim fought back, kicked and bit him, and managed to escape Stevenson's house. She drove to a hospital and then called the police.

Giving evidence at the trial, she said: "He grabbed me from behind by my neck. He told me that I wasn't going anywhere. He said 'shut up' and 'just be a good girl'. He said it would be all over in ten minutes."

She said she "knew it was do or die".

The court was given details of Stevenson's two High Court convictions. He served a six-year sentence for assault to danger of life in 1998 and a four-year term for assault in 2002.

Defence counsel Frances Connor said Stevenson, who still denies the attack, was addicted to alcohol and "legal highs".

She added: "I am limited on what I can say, given my client's position is one of denial."

Lord Kinclaven deferred sentence on Stevenson until June.