A former soldier has been jailed for following a man into a solicitor's office and stabbing him several times.
David Prestidge, 53, from Rhyl, followed Darren Fleming from a court hearing into the office and then attacked him with a knife.
He was jailed for five years at Mold Crown Court after admitting a charge of wounding with intent.
Judge Niclas Parry said but for "miraculous good fortune" he would have ended up on a murder charge.
He stabbed Mr Fleming in his neck, chest, left arm, abdomen and thigh and the blade also penetrated his liver.
The court heard during the attack Prestridge shouted "I am going to kill you" and later told police he was "gutted" that the victim was not dead
The attack happened at the offices of solicitors Edward Hughes and Co in Rhyl on 6 October.
That day the defendant's daughter Emily, who had a daughter with Mr Fleming, had been involved in an acrimonious contact hearing with him.
Prestidge followed him from the court, armed with a knife, and saw him enter the solicitor's office.
Prosecutor Emmalyne Downing said that the victim suffered multiple injuries after being struck about half a dozen times.
Interviewed, Prestidge accepted what he had done but said that his mind went blank after he entered the solicitor's office.
In a victim impact statement, Mr Fleming said he had done nothing to provoke the attack apart from trying to get contact with his own daughter.
Defending barrister Duncan Bould said Prestidge was a dedicated family man.
"This is a genuine man who has been driven to breaking point by what he perceives to be the behaviour of another person towards his family," said Mr Bould.
Judge Parry said he accepted Prestidge had been driven to act out of character by what was, rightly or wrongly, genuine concern for his daughter and grand-daughter.
Judge Parry told him: "But for miraculous good fortune, the commendable reaction of the staff at Edward Hughes and Company, and exceptional medical care, you would be facing sentence for murder."