Gavin Cochrane was involved in a vicious attack on Christopher Beith outside flats in Elderslie, on May 16 this year.

A judge heard how the 26 year-old victim was so badly hurt that he thought he was going to die. Cochrane, 27, was jailed for four and a half years on Friday after he admitted to an assault charge at the High Court in Glasgow.

The attack happened after Mr Beith had gone to a flat in Lomond Gardens, Elderslie wrongly thinking a friend lived there.

The court heard there was a party going on inside — Mr Beith then tried to get in, but was told to go away.

Prosecutor Angela Gray said he then walked off, but felt “uneasy” and texted a friend to meet him.

However, he was then set upon in the street by Cochrane and an accomplice, who had both stormed out of the party. Cochrane repeatedly struck Mr Beith with a knife while the other attacker lashed out with a bottle. The pair fled before a passing taxi driver stopped to help the blood soaked victim.

Miss Gray told the court: “He said that he had been assaulted and thought that he was going to die.” The cabbie called for an ambulance and also gave Mr Beith first aid.

Mr Beith was treated at hospital for a number of wounds, but is now scarred for life.

Cochrane was later identified as one of the attackers, but initially made no comment to police.

Bob Mitchell, defending, said the thug “fully regretted” what happened that night.

Lord Boyd told Cochrane that the jail-term would have been six years, but for his guilty plea.

The judge went on: “This was a cowardly attack. The use of knives as weapons are all too prevalent in Scotland.”