A sexual abuser who assaulted two women in the compound of an Edinburgh hospital has been in prison for almost four years.
David Milligan, 21, attempted to rape a woman at the Royal Edinburgh Infirmary in February, but was arrested when a passerby heard him shout.
Twenty-four hours earlier, he had assaulted another woman for the same reasons as a cigarette.
Milligan had previously admitted attempts at rape and sexual assault. His DNA and a pink backpack helped him catch him.
Lord Mulholland sentenced him to three years and nine months of imprisonment at the Glasgow High Court.
He will be monitored for two years after his release.
"Danger for women"
The judge said: "You pleaded guilty to attacking two women who were strangers to you.
"In the second attack, you tried to violently rape a woman, and if a member of the public did not pass, you would have realized your intention.
"By your actions, you are a danger to women."
Milligan's lawyer, Niall McCluskey, said that he had been crying while discussing crimes and that he "did not know what had happened to him."
Detective Inspector Jonny Wright of the Scottish Police said: "We welcome today's condemnation of David Milligan, whose acts terrified the victims, who were deeply taken aback by their hardships.
"I thank them for their continued support throughout our investigations and hope that sentencing will bring them some comfort in the pursuit of their lives.
"The incidents occurred less than 24 hours apart and the officers launched an in-depth investigation into Milligan, which then culminated in his conviction."