The partner of a murdered businesswoman exchanged explicit messages and photographs with a woman in the weeks before she allegedly committed the brutal killing.
Ex-fireman Ian Johnston told the trial of Sarah Williams that he had tried on several occasions to tell the defendant their relationship was over, but admitted the text contact between the pair.
It is alleged that Williams, 35, was obsessed by Mr Johnston, 57, and "eliminated" his partner, Sadie Hartley, 60, when he refused to leave her.
Ms Hartley was found in a pool of blood at her home in Helmshore, Lancashire, after she was incapacitated with a stun gun and then stabbed to death 40 times on January 14.
Giving evidence at Preston Crown Court on Thursday, Mr Johnston said a sexual relationship with the accused began after they first met in December 2012 on the indoor ski slopes of Manchester's Chill Factore complex.
Phone numbers were exchanged and text messages began which became "very flirty on both sides" before the relationship developed.
Mr Johnston said: "It was very quick. There was no dating. She would turn up at my house ... and arrived in a short skirt and red high heels."
The liaisons at Mr Johnston's then home in Helmshore became regular for "a short period", the court heard.
During this time the ski instructor and coach was also involved in an "intermittent" relationship with communications director Ms Hartley, who he had been intimate with since 2005.
Before the summer of 2013 Mr Johnston said he had tried to finish his relationship with Williams, also a qualified ski instructor.
He told the court: "I had suggested to Sarah Williams before the relationship started that I didn't want a relationship per se. There were no plans to settle down. I didn't think it was fair."
John McDermott QC, prosecuting, asked: "Her reaction?"
Mr Johnston replied: "She wanted to continue the relationship."
Williams was coming to his house unannounced, which he was "certainly not happy with", but he let her in with intimacy "maybe on one occasion".
He said that by October 2013 he and Ms Hartley were back together and travelled to Ecuador for a 22-day trip.
In December 2013 the pair went on a skiing holiday and stayed at the same hotel as Williams and her partner, David Hardwick, 75, but he said Ms Hartley was not aware of his relationship with Williams at that time.
Williams later texted him that she loved him, but Mr Johnston told the court he tried to "placate her" and deter her interest.
In September 2014, Ms Hartley received an anonymous letter which boasted that the sender had had "fantastic" sex with Mr Johnston and accused her of blackmailing him for money to stay together.
Mr Johnston said: "I thought a lot of it was nonsense."
Williams arrived at Mr Johnston's home the day after the letter was received, Mr Johnston said, and she again was wearing a short skirt and red high heels.
He said: "I tried to stop her in the doorway. She physically tried to move me out of the way to get in. I was very aware I had to restrain her and I didn't want to hurt her.
"She was shocked at me not letting her in. She appeared shocked that I knew about the letter, the letter was anonymous.
"Sadie asked me who it was from and I said it was Sarah Williams.
"I managed to get her (Sarah) out of the house. I felt it was immature and childish. She left shouting and screaming and walked down the road with her high heels in her hands."
He said he and Ms Hartley then discussed the "merits of the letter" and following a short break with the "pragmatic and driven" Ms Hartley, decided to move in together in Sunny Bank Road, Helmshore, in November 2014.
Text messages continued to be sent into the following year by Williams, which Mr Johnston did not block, the court heard.
Asked why, he said: " At the time it was an incredibly difficult period. there was a massive amount going on in our lives ... I don't want to go into the full detail."
He said his mother was ill, a relative of Ms Hartley was ill and Ms Hartley herself was "shattered" through work and had been injured in a fall from her horse.
On December 3, 4 and 5 last year there were sexually explicit texts and photographs between Mr Johnston and Williams, said Mr McDermott.
Mr Johnston said: "They were naked photographs."
The prosecutor said: "As we understand, you didn't block this traffic and you responded in kind?"
"Yes I did," said the witness.
Mr McDermott asked: "Did you not want the relationship with Sarah Williams rekindled?"
He said: "Not at all. I read these the day after. I was absolutely distraught I had sent the texts."
More explicit photographs followed, including one sent by Williams on Christmas Day.
On January 4 - some 10 days before the murder - more explicit photographs were messaged from Williams and "a similar response" received from Mr Johnston, the jury heard.
On January 10, Mr Johnston texted Williams from Switzerland: "All going well and we have snow."
Williams replied: "Glad to hear ... giving a great big cuddle to keep you warm."
Ms Hartley had been due to join Mr Johnston on the skiing break before she was murdered.
Mr McDermott asked: "What were your intentions with Sarah Williams once you would return to this country?"
Mr Johnston said: "Nothing at all. I can't recall half the text messages."
He said that after September 2014 he said he was only alone with her on one more occasion, when she stood in front of his car bonnet in the car park of the Chill Factore where she worked at Crystal Ski Holidays.
He said: "I told her I could not be seen with her, and drove off."
Mr McDermott asked: "Had Sarah Williams ever said anything to you about Sadie, her feelings about her?"
Mr Johnston said: "Nothing at all. The letter was the only negative that I had ever heard."
Williams and riding instructor Katrina Walsh, 56, of Hare Lane, Chester, both deny murder.
Walsh is said to have played a key role in helping her friend to "eliminate" her love rival.
Gordon Cole QC, defending Williams, revealed a series of graphic sexual text messages between the defendant and witness, questioning his claim he was trying to end the relationship.
Instead Mr Cole suggested Mr Johnston had repeatedly "led her on" while being with Ms Hartley at the same time.
Mr Johnston said: "I did not want a relationship with Sarah. I was flattered by a young lady. It was placation, an entertainment."
Mr Cole said: "You knew Sarah loved you. You knew she was genuine in those feelings, she was very much in love with you."
Mr Johnston replied: "I would say our relationship was purely sex, and historic by this time."
"You led her on," Mr Cole continued, "You led Sarah Williams on and on."
Mr Johnston replied: "No I did not."
He was then asked about the exchange of explicit photos, and sending pictures of his genitals, to the defendant on five separate occasions, but Mr Johnston said he could not remember doing so.
Mr Cole said: "I don't suppose you are in the habit of doing that to everybody?"
"No, not at all," Mr Johnston replied.
Mr Cole read out text exchanges, sent in September 2013, one from Mr Johnston to Williams, saying: "Feeling very hard and horny. Could really f*** you hard right now."
Mr Cole continued: "That's trying to get rid of her is it?"
Mr Johnston replied: "It said, 'Could' it did not say will or shall."
The court also heard about a skiing trip to France in November 2013.
Mr Johnston was on the trip with Ms Hartley while Williams was on the same trip with her wealthy businessman "sugar daddy" David Hardwick.
Mr Cole showed the court further exchanges of texts between the defendant and Williams.
Mr Cole asked: "Were you and Sarah playing footsie under the table?"
"No. Electronic flirting," the witness replied.
Mr Cole then read a text from Williams: "Loved foot cuddling with you under the table last night."
"I stand corrected," Mr Johnston replied, adding: "At the time I was not in a relationship with Sadie. I was away with Sadie. I had not made any commitments."
A further text exchange in November 2013 revealed Mr Johnston paid a visit to Williams' home to do with a shared interest in Telemark skiing and they had sex.
Mr Cole asked: "Did you tell her you did not want anything to do with her once you had sex with her?"
"No I did not," the witness replied. "At the start of this it was a purely sexual relationship, she was very persistent and I was flattered."
Contact with Williams continued before and after Mr Johnston and Ms Hartley enjoyed a holiday in Ecuador, the jury heard.
After further explicit text messages were read out, Mr Cole asked the witness again: "Do you agree this is not consistent with you trying to get rid of her?"
Mr Johnston replied: "I would agree with that."
Mr Cole continued: "Did Sadie know about these texts?"
The witness replied: "No she did not."
The witness later broke down in tears and the hearing was briefly adjourned while Mr Johnston left court to compose himself.
He had again been closely questioned by Mr Cole over explicit text messages exchanged with Williams in the weeks before Ms Hartley's death after he asked her to "send something sexy".
Mr Johnston said: "I'm not making any arrangements to meet her. I'm doing my best just to keep her on board with the minimum of response. Sometimes I fall foul of that.
"It's just me engaging."
In late December last year the court heard he was caring for his terminally ill 84-year-old mother, who died on December 19, while the texts continued.
Breaking down in tears, Mr Johnston said: "That week I had eight hours sleep and my mother dying in front of me. It was a moment of weakness."
The court heard of another lengthy text exchange between the pair and Williams saying she wanted "spanking" and adding: "Any of this working for you?"
Mr Johnston texted back: "What man would it not work for. Dangerous I know."