A man tried to kill a visitor to his flat by stabbing him dozens of times after a vodka drinking session.

Slawomir Lipinski admitted attempting to murder Marcin Komosinski by repeatedly striking him with a knife.

The attack occurred at Lipinski's home on Duke Street, Edinburgh, in February last year.

A judge told Lipinski at the High Court in Edinburgh: "It is only right that I should make it clear to you at this stage that in view of the gravity of this offence it is inevitable I will impose a substantial period of imprisonment on you."

Lord Pentland remanded the supermarket cleaner in custody ahead of sentencing.

Advocate depute Owen Mullan said Lipinski, the victim and another man had drank a "large amount of vodka".

Lipinski's flatmate returned and asked them to quieten down as they were shouting.

He went through to his bedroom and the noise dropped but he was awakened by the sound of a disturbance.

The flatmate later heard Lipinski shouting: "You tried to rob me."

He got out of bed and found Mr Komosinski lying face down on the floor with blood flowing from his body.

Lipinski's flatmate called the police, who forced entry to the flat and found Lipinski learning over his 28-year-old victim.

Mr Komosinski had suffered more than 30 stab wounds to his back and other injuries to his face and head.