A JILTED boyfriend who tried to murder the father of his former partner's new baby has been jailed for nine years.

Armed with a knife, Mark Cornwell, 31, of Allan Crescent in Dunfermline, entered the bedroom where Michael Watson was sleeping along with Anne-Marie Robertson and their days-old child.

His victim "believed he was going to die" as he was punched on the face and woke to find his attacker on top of him and about to stab him in the chest.

First offender Cornwell pleaded guilty at an earlier court hearing to attempting to murder Mr Watson on February 23 last year.

At the sentencing at the High Court in Edinburgh on Tuesday, a judge told him that he had made "a determined effort" to murder his victim in the early-morning attack.

Lord Boyd of Duncansby said: "It is only through the determined efforts of Mr Watson himself, with the assistance of his partner and her grandparents, that you did not succeed in that endeavour.

"What you did was plainly cowardly and despicable."

Advocate depute Eoghainn Maclean had previously told the court that Mr Watson had instinctively grabbed the blade with both hands as Cornwell tried to stab him.

He said: "As they struggled, the accused repeatedly said he was going to kill him.

"Mr Watson bled profusely from his hands while he clenched the knife as hard as he could and pushed up against the constant pressure exerted by the accused.

"As he continued to use his strength and weight to force the knife down towards Mr Watson, the accused shouted: 'You are a f*****g prick Mick'.

"The struggle lasted about two minutes. Throughout, Mr Watson believed he was going to die," said the advocate depute.

Miss Robertson, who was screaming, tried unsuccessfully to get Cornwell off the victim.

The noise alerted her grandparents and her grandfather grappled with the attacker and pulled him off the bed.

Cornwell left the bedroom at the grandparents' home in Dysart, shouting: "This isn't over. We're not f*****g finished yet."

Mr Watson, 35, was taken to the Victoria Hospital in Kirkcaldy and 14 stitches were put into his hand wounds.

The advocate depute said the victim had "recurring, intrusive memories and nightmares about the attack".

In them he panics, believing that he is about to be attacked again and that he and the child suffer harm or the child will be left parentless.

Cornwell admitted entering the flat uninvited and assaulting the victim to his severe injury, permanent disfigurement and to the danger of his life by punching him, threatening to kill him, repeatedly trying to strike him on the chest with the knife and repeatedly striking him on the hands with the weapon as the victim attempted to defend himself.

Lord Boyd said: "I accept this offence came about by your inability to come to terms with the break-up of the relationship. Nevertheless, this is a very serious offence."

He told Cornwell that he would have faced a 10-year jail sentence if he was convicted after a trial.

He said it was clear the victim continued to suffer from the physical and psychological effects of the assault and added: "All the persons in the flat must have been traumatised by your attack."

Mr Maclean said that Cornwell, a takeaway driver, was in a relationship with Miss Robertson for about eight years up until June 2017.

She was living with her grandparents and Cornwell also stayed there for a time. The grandmother would get up early to let their dogs out and leave the front door unlocked.

Mr Watson had developed a friendship with Miss Robertson online and in May 2017 they met up for the first time. She separated from Cornwell shortly afterwards.

She began a new relationship with Mr Watson and, 12 days before the murder bid, gave birth to their child.

The advocate depute said that Cornwell struggled to get over the separation and had "a suicidal episode" around August 2017.

The court was told that the day before the attempted murder, he drove past the couple. He returned early the following morning to launch the murder bid.

Police spotted him driving back to his mother's home after the attack and he was arrested and the knife recovered from the car.

Defence counsel David Nicolson said Cornwell maintained that he had no memory of the attack.

He said he remembered taking a knife from his home with the intention of committing suicide in front of his former partner.

Mr Nicolson said: "He wanted to commit suicide in front of her but there was no clear plan how to do that. If that was the plan, the plan changed.

"It is reasonable to infer that what has given rise to this offence is his inability to come to terms with the break-up of the relationship.

"He does not accept that but that is a reasonable inference from the facts and circumstances."