Bradley Rawlinson sent Katie Foreman love-filled text messages saying he wanted to start a family together at the same time he was telling his secret lover Wendy Evans that he wanted Ms Foreman "gone" from his life, a court has heard.
Rawlinson is on trial in the NSW Supreme Court accused of murdering Ms Foreman by paying to have her house set on fire in the early hours of October 27, 2011.
It is alleged he and Evans wanted Ms Foreman dead so they could be together, and hired western Sydney couple Bernard Spicer and Michelle Proud to help organise and carry out the plan.
Text messages sent between Rawlinson and Ms Foreman in the five months prior to her death revealed the pair had a turbulent relationship, punctuated by fights, lies and allegations of physical abuse by Ms Foreman towards Rawlinson.
On more than one occasion between June and October, Ms Foreman told Rawlinson to "f--- off" and that she never wanted to see him again.
Despite the volatility, Rawlinson appeared to maintain strong feelings for Ms Foreman, regularly telling her he loved her and she was the most important thing in the world to him.
However, when he caught Ms Foreman kissing Evans's son Ashley while out one night in July, he turned to Evans for emotional support.
The pair began to exchange text messages about the situation and grew close, with Rawlinson at one stage in mid-August telling Evans that Ms Foreman had organised to have her and her family "hurt".
Prosecutors allege the pair's relationship turned intimate in late August/early September, unbeknownst to Ms Foreman.
During one text message exchange, Rawlinson told Evans he feared Ms Foreman would harm him, Evans or their families if he left the relationship.
"I am so sorry for what I am putting you through," Rawlinson wrote to Evans on September 10.
"You mean so much to me and I feel terrible that this crap with her keeps going on. I wish I knew a way to get her to go away or hurt her."
In several text message exchanges throughout September and early October, Rawlinson repeatedly confessed his love for Evans, his frustration at being with Ms Foreman and his desire to see her "gone".
However, the message trail reveals Rawlinson was continuing to express his love for Ms Foreman at the same time, sending her text messages almost daily, many of which appeared to go without a reply.
Prosecutors allege it was around this time that the plan to kill Ms Foreman was formed.
On October 2, Rawlinson told Evans they only had one week until "she is gone and we are away from her", while the following day he wrote: "This is hell. She is a cow. She's carrying on like an idiot. God I want her gone."
Rawlinson also messaged Evans on October 13, saying "I want to be with you till I die and I hope you understand the various reasons why it needs to happen to her now. I love you."
Prosecutors allege he was referring to killing Ms Foreman.
The trial continues.