A SEX attacker who raped a woman was caught by police outside her flat in Dumbarton with his fly down, a court heard.

Scott Murray, 28, attacked the 41-year-old's male friend in her house before carrying out the attack on her.

He threatened to “kill her boy” during the incident while she said “enough is enough”.

When police arrived they found Murray at the entrance to the woman's close with his jeans unbuttoned at the fly and appeared to be bloodstained.

Murray pleaded guilty at the High Court in Glasgow to raping the woman on January 21 this year and assaulting her 60-year-old friend at her flat in Dumbarton to his severe injury and permanent disfigurement.

He also admitted an indecent assault, to her injury, on a 56-year-old woman on December 1, 2016 at a flat on Glasgow Road, Dumbarton.

The court heard Murray knew his 41-year-old victim, who has since tragically died, and banged on her door on the day of the rape.

She phoned her friend in a “panicked state” as Murray came in to her house but she didn't speak to Murray until her friend arrived.

Advocate depute Graeme Jessop said: “When he arrived he sat next to the accused on the couch and they all began to talk.

“Minutes later, the accused challenged the man about comments he made to the accused's step mum.

“These comments suggested if the accused came to the woman's door again that he would 'kick the accused in'.

“Murray then picked up a small wooden stool and struck the man over the head with it several times.”

The 60-year-old fell on to the couch and was further battered over the head with the legs of the stool.

He grabbed a television cable and held it over the pensioner's neck and pinned him down.

Murray threatened that he was “going to choke the life out of him, kill him, rape the woman, and kill her".

Both men were cut by a mug that the man tried to hit Murray with.

The thug then turned to the woman and raped her, and threatened to “kill her boy”.

Mr Jessop said: “[The woman] told the accused on several occasions 'enough is enough, stop'.

“She was extremely scared of what Murray would do to her during this, having just witnessed him severely assault her friend.”

Murray left and the woman's friend asked a neighbour to contact emergency services.

When the police arrived they heard someone in the close area and found Murray standing at the entrance with his jeans unbuttoned at the fly area and bloodstained.

The woman and her friend were taken to hospital, she was found to have no visible injuries while the man had cuts and bruises to his head, right eye and hand which will leave scarring.

Murray had a fracture below his right eye socket, cut to the right cheek and swelling and soft tissue damage to the right of his chin.

Defence counsel Ronnie Rennuci said sexual gratification was "not the driving force" and both sexual crimes were committed "in full view of witnesses".

Judge Lord Burns put him on the sex offenders' register, deferred sentence until next month and remanded Murray.