A riding instructor accused of murder feared her co-defendant would frame her for the crime and then poison her, leaving behind a faked confession, a jury has heard.
Katrina Walsh, 56, feared for her life at the hands of Sarah Williams, 35, after Williams's love rival, Sadie Hartley, 60, had been murdered, Preston Crown Court was told.
Ex-husband Kevin Walsh told the jury on Tuesday that he married the defendant in 1984 and they shared interests in motorcycles, horse riding and Viking re-enactment battles.
But he had a "mid-life crisis" and left Walsh for another woman in 2008 though the two were soon reconciled and in a "cordial" relationship again as friends.
Mr Walsh said after his former wife of 24 years was arrested for Ms Hartley's murder he visited her in prison.
Both his ex and Williams were held days after businesswoman Ms Hartley was found dead in a pool of blood in the hall of her £500,000 house in Helmshore, Lancashire, on January 14.
Walsh is alleged to have helped plan the murder plot, committed with "demonic savagery" by Williams who paralysed her victim with a stun gun before stabbing her 40 times with a kitchen knife.
"Jealous" Williams is alleged to have murdered Ms Hartley in an "orgy of violence" because she was having an affair with her love-rival's partner, ex-fireman Ian Johnston, 57. Both women deny murder.
On Tuesday, Mr Walsh told the jury what his former wife, known as Kit, told him on his prison visit.
Wearing a sleeveless leather biker's jerkin, revealing heavily tattooed arms, Mr Walsh told the jury: "She said it was all due to Sarah. Sarah was trying to frame her for it.
"The idea was that Sarah was going to poison her on the Saturday night and leave a printed confession on the murder. Fortunately, Sarah was arrested before she was able to do that, but Kit had visions of Sarah finishing the job at a later date."
In a letter from jail, Walsh had also written to him saying: "I have a very big incentive for her to be found guilty.
"She thought she had more time and my printer was out of ink or I'd have died on Saturday. So I really want her convicted and away for a good long time because I don't fancy my chances if she's out."
Mr Walsh said the "incentive" was because "Kit was in fear of her life from Sarah."
Earlier, the court heard the defendants had allegedly tried to recruit Mr Walsh to the murder plot using his "skill set."
He said in August last year his ex-wife made contact out of the blue and tried to set up a meeting between him and Williams for something "nefarious".
Mr Walsh, a warehouseman, said Williams called him days later saying she had a "job" suiting his "particular key skills" but did not want to discuss it over the phone and wanted to meet in a pub.
But Mr Walsh told the jury Williams was using a "burner" or untraceable, pay-as-you-go mobile phone and he soon got cold feet and backed out, thinking Williams was "up to no good."
"The alarm bells were going off in my head," he added.
Mr Walsh, 58, told Anthony Cross QC, defending Walsh, that there was "nothing sinister" about the Norse Film and Pageant Society, which he said staged re-enactments of Viking battles using blunted axes and swords.
He said its members came from "all walks of life" and would put on family events at country shows.
Mr Walsh also confirmed he had been a member of an archery club more than 30 years ago and had taken up the sport again 18 months ago.
Asked how frightened his ex-wife appeared when she spoke about Williams in prison, Mr Walsh replied: "I would say she was very genuinely frightened."