A man who met a bookkeeper through internet dating became worried after receiving a text message from her the day before she was allegedly murdered, a court has heard.
Jurors were told Suzanne Pilley sent the message to Mark Brooks on May 3 2010, explaining why she had called off a planned meeting with him the night before.
Mr Brooks told how he thought Ms Pilley was in a "difficult romantic situation" after he got the text, in which she spoke of arguing with "David" and asking him to leave.
Earlier, Ms Pilley's mother told the court how her daughter had a "turbulent" relationship with David Gilroy, the man accused of murdering her. A third witness described how Gilroy threatened to stab and kill him during a confrontation in 2009.
The evidence emerged on the second day of Gilroy's trial at the High Court in Edinburgh. The 49-year-old, from Edinburgh, denies murdering 38-year-old Suzanne on May 4 2010 in Edinburgh, or elsewhere, hiding her body and driving away with it in the boot of a car.
Jurors have heard that Gilroy, who had left his wife, moved in to Ms Pilley's Edinburgh flat in Whitson Road in May-June 2009. By May 2010 she was said to be single.
Mr Brooks, a 41-year-old planning officer from Edinburgh, told how he and Ms Pilley made contact in mid-April that year through a dating website.
The pair communicated over text message, email and telephone before eventually meeting on May 1 2010. Mr Brooks said they spent that Saturday at bars in Edinburgh. They then kissed and he went back to her flat.
Mr Brooks told how he later invited Ms Pilley round for a meal on Sunday May 2 but that she cancelled via text late on that afternoon, saying she had a "visitor" and that things were "complicated".
The following day, the court heard, he received a further message from Ms Pilley, which read: "God almighty. I had such a rubbish night. David appeared as I was leaving. I asked him to go and if (sic) wouldn't. I was arguing with him, asking him to leave. I cried when I sent that text to you because I really wanted to come down and see you."