A man who tried to murder his estranged wife with a crowbar has been jailed for ten years.
A judge told Roy Thompson, 49, from Kempton Drive in Coleraine that he had been guilty of a "planned, murderous" attack on his wife Carol last year.
The court heard how Thompson admitted to planning to kill his wife before taking his own life.
When purchasing the crowbar at a local DIY store, he had also bought wood to build a gallows.
Antrim Crown Court heard that Thompson also left behind suicide notes to his father, daughter, best friend and former partner, and even a confession to murdering his wife, 33, on March 5, 2009.
However, although Thompson did attack his wife in their Ballycastle home in County Antrim, he had a change of mind and couldn't go though either with killing her or himself.
Judge Smyth told Thompson that his change of mind may have been a "result of the realisation of the enormity and of the wickedness of what you were doing".
However, initially Mrs Thompson, said the judge "clearly and with good reason believed that she was going to be killed".
"She began fighting for her life, both physically and also by using persuasion," he added.
Judge Smyth went on to described Mrs Thompson as "clearly a robust person capable of restraining panic and acting with purpose in what must have been the most appalling circumstances".
Thompson had denied attempting to murder his wife, but made a witness-box confession while being cross-examined by prosecution QC Richard Weir.
Thompson admitted he intended to cause his wife serious harm when he had sprayed her face with an aerosol before hitting her over the head with the crowbar.
Mr Weir then put it to Thompson that he had intended to kill his wife, which after a short pause, he openly admitted.
The court had heard that on the day of the attack, Thompson had gone shopping at his local DIY store where he bought a set of tools, a crowbar, a length of blue nylon rope, a futher stout rope, wood spars and a roll of tape.
Before the attack itself, Thompson built for himself a working gallows in the attic before penning his suicide notes.
In one, he wrote: "I would also like to confess to my wife's killing".
During the attack itself, Thompson demanded to know the identity of her new boyfriend, telling her: "I am going to kill you and then I am going to kill myself.
"I have a rope in the house. I have been planning this for weeks."
However, Mrs Thompson, a primary schoolteacher, after a failed escape attempt, managed to talk Thompson round, telling him things between them would be okay, if only he would ring the emergency services.
Judge Smyth said they both even "agreed to fabricate a story to conceal the true origin of Mrs Thompson's injuries".
"Mrs Thompson's presence of mind stretched to agreeing that her husband should come to the hospital in the ambulance with her.
"She, I am satisfied, did that for the principle reason that she did not want her husband to carry out your intention to hang yourself," the judge added.
However, once in the hospital, and alone in a cubicle, she told medical staff she had not fallen in the bath, but had been attacked by her estranged husband.
Defence QC Laurence McCrudden said a remorseful Thompson now accepted that his marriage and life with his estranged wife, with whom he had spilt amicably in September 2008, was now over.
However, at the time, a clearly distraught Thompson "was a man who mistakenly and in a misconceived way could not let go and had resolved upon a course as old as history".
Thompson, as part of his sentence agreed to serve three years probation upon his release, which Judge Smyth said should "ensure the proptection and peace of mind of Mrs Thompson".