A man raped a woman and attacked another a week after being released from prison.

Raymond Dempster may never be released from jail after being given a lifelong restriction order.

The 39-year-old raped a woman, aged 42, in her home in the east end of Glasgow on June 20 last year.

He attacked her after she was locked out of her home and he helped her to get back into the property.

Dempster, of Glasgow, then pounced on a 19-year-old student at Kelvin Walkway in the west end with the intent of raping her three days later.

It came after he was released early from a sentence of robbery and assault on June 17.

Dempster, who has 110 previous convictions for crimes of dishonesty and violence, is one of 400 to have been given the restriction order.

At the High Court in Glasgow, Judge Norman Ritchie QC told Dempster he must serve at least five years before he is eligible for parole.

He said: "You are a dangerous violent criminal and represent a very significant risk to the public and particularly women.

"Many hundreds of orders for lifelong restriction have been made but very few will be released.

"For you, release may never happen."

Judge Ritchie praised the bravery of the student who managed to fight off Dempster as he tried to rape her, describing her as "a brave and resourceful young woman".

Outside the court, the student said: "I am very relieved he is not going to be released from prison for a very long time.

"This sentence has taken a long time coming. I'm glad it wasn't a more vulnerable woman he picked on that night. He underestimated me. I don't think he thought I would fight back."

Mr Ritchie said: "A man with his record is simply shown the door and then within a handful of days has attacked two women."

The rape victim has since died and her police statement was read out as evidence in court.

She told of how she was locked out of her home in her night clothes and Dempster came along and at first she thought he was a good Samaritan.

The victim told police Dempster said "you've got a nice wee flat here" before grabbing her by the arms and pushing her into the bedroom, removing her clothing and raping her."

Dempster's other victim was walking home alone in the early hours of the morning. He followed her and tried to engage her in conversation, but she ignored him.

He then grabbed her by the arms and forced her to the ground and then put his hand over her mouth.

The 19-year-old fought back, kicking Dempster in the face before he fled to the hostel he was living in.

She said: "I believe his intention was to rape me."

The court heard police managed to find CCTV footage which showed Dempster in the vicinity of the attack at the crucial time. His victim identified him as her attacker.

Solicitor advocate Jim Wallace said Demspter now accepted he carried out the offence sand is remorseful.