A knife attacker who stabbed his victim 27 times and left him lying on the road was caught after a trail of blood led police to him.

Daniel Johnstone admitted attempting to murder Paul Sullivan on Balmoral Road in Kilmarnock during a hearing at the High Court in Glasgow on Friday.

The 26-year-old's life was saved after a security guard found him lying on the street at 2.20am on March 28.

He then underwent a four-hour operation to repair damage to his bowel and liver.

Meanwhile, police followed a trail of blood leading from where Mr Sullivan lay to a house on Balmoral Road.

A blood-stained carrier bag containing a knife was found at the rear of the house and Johnstone was found in bed asleep wearing a blood-stained T-shirt.

Forensic experts examined the knife and the T-shirt and found both had Mr Sullivan's blood on them.

Defence advocate Paul Nelson said the two men had been drinking together earlier that night.

He added: "Mr Johnstone went inside the house in Balmoral Road but Mr Sullivan was not allowed in.

"Mr Sullivan was kicking at the gate and making a lot of noise and was asked to leave.

"When he refused to do so Mr Johnstone picked up a knife to back up his request to go away. However, Mr Sullivan came towards him and he acted in the way described."

Judge Lord Kinclaven deferred sentence until next month at the High Court in Edinburgh.