A knife attacker stabbed a stranger after the victim tried to act as a peacemaker during a confrontation.
Rhys Marshall, 26, wounded Colin McNeill twice with blows to his side during the street assault in Fife.
The High Court in Edinburgh heard that Mr McNeill, 33, was at home on December 6 when he heard raised voices and looked out to see his brother arguing with a neighbour.
He intervened and put his hands between the pair in an attempt to calm the situation.
Prosecutor Leanne McQuillan said: “The complainer then became aware of the accused, who was not known to him, placing his hand on his shoulder.”
Mr McNeill pushed Marshall and during a struggle he felt two “digs” to his left side and thought he had been punched.
He then shoved Marshall who fell, the court heard.
Ms McQuillan said Mr McNeill began to feel “quite funny” and put his hand to his side and felt wetness and realised there was blood.
He shouted: “You’ve stabbed me. I’ve been plugged.”
Marshall fled from the scene. The victim began chasing him but began to feel faint and returned to his home in East Wemyss.
A 999 call was made and the stabbing victim was taken to the Royal Victoria Hospital in Kirkcaldy where his wounds were cleaned, dressed and stitched.
A doctor said the wounds presented a potential danger to the victim’s life.
Police caught up with Marshall in the early hours of the following day in Leven but he became aggressive with constables Jenny Walker and Duncan Shand.
He spat at them and said: “I will stab you both and kill your bairns.”
The advocate depute said Marshall made further threats that he knew where they lived and would kill them and their families.
Unemployed Marshall, of Maple Gardens, Methil, was originally charged with attempting to murder Mr McNeill on December 6 last year at Alexander Street, East Wemyss.
The Crown yesterday accepted his guilty plea to a reduced charge of assaulting him to his severe injury, permanent disfigurement and to the danger of his life.
He also admitted assaulting the police officers by spitting at them on December 7 at Windygates Road, in Leven, and resisting them by struggling, repeatedly attempting to kick and punch them, swearing and uttering threats of violence towards them, their children and families.
The court heard Marshall has previous convictions for violence and was released from his last prison sentence in August.
The judge, Lady Scott, deferred sentence on Marshall until next month for the preparation of a background report, including a risk assessment.
Marshall is currently detained in Perth Prison.