However, Neill, 42, of Birkshaw Tower, Wishaw, avoided a prison sentence at Hamilton Sheriff Court due to the “considerable provocation” which led to the assault.

He admitted stabbing Mr Smith to his severe injury and the danger of his life at Neill’s home on February 6 last year.

Michael McIntosh, prosecuting, said Neill’s daughter and her boyfriend were also in the flat at the time.

Neill and Mr Smith had a discussion about each other’s children which became “heated” and led to a “stand-up fight”.

Mr McIntosh said Mr Smith was getting the better of the brawl and the others in the room had to separate them.

The prosecutor added: “There were moments of calm before the accused went to the kitchen and got a small knife. He approached Mr Smith, grabbed him by the neck and stabbed him twice before he was disarmed by his daughter and her boyfriend.”

Despite his wounds, Mr Smith left the flat on his own and Neill, who had suffered a nose injury, called the police to admit what he’d done.

Neill told the police they were good pals and “this is the first fight we’ve ever had”.

Mr Smith was treated at Wishaw General for stab wounds to the chest area.

Mr McIntosh explained: “An x-ray showed internal injuries and he had his chest drained. A full recovery was expected but medical opinion was that, due to the proximity of the injuries to Mr Smith’s heart, there had been a potential danger to life.” Defence agent Andy Thomson told the court: “This was truly unfortunate. Mr Smith was my client’s closest friend for 20 years but there has been no contact since this.

“He is full of remorse.”

The solicitor said he wouldn’t normally ask for an alternative to prison when a client was facing such a serious charge but in this case there were “truly exceptional circumstances” .

Sheriff Marie Smart told Neill he was a lucky man. She stressed: “It’s only because the Crown accept there was considerable provocation that I can deal with this by way of a non-custodial sentence.”

Neill will be supervised for two and a half years and must do 220 hours of unpaid work. He will also be tagged for six months, meaning he can’t leave home from 7pm and 7am.