A landlord accused of a double murder had threatened to kill his tenant just hours earlier, a jury was told.
Mehmet Ali Ozen is alleged to have told a friend of his tenant Keyleigh Wright that she was "doing his head in".
Ozen went on to stab Ms Wright after confronting her following a row over rent money, the jury at Lincoln Crown Court heard.
Ozen, who sub-let the second floor flat of his home in Red Lion Street, Boston, allegedly lunged at her throat with a large kitchen knife but she managed to parry the blow and was stabbed in the arm.
John Pini QC, prosecuting, told the jury at Lincoln Crown Court that Ms Wright's partner Darren Harwood and her flatmate Charlotte Piccaver went to her assistance but both were then stabbed to death by Ozen.
Witness Ashley Gradbury, 20, a friend of Ms Wright, gave evidence and said that Ozen, who lived in the first floor flat of the building, had earlier made threats against Keyleigh.
"I came down for a cup of tea. He said if Keyleigh came in he was going to kill her.
"I said 'don't do something stupid. You'll get yourself in a lot of trouble.' He said 'I really want to kill her because she's doing my head in'."
Keyleigh Wright, 24, told the jury she was confronted by Ozen as she entered their shared kitchen to get a drink.
She said: "He came out of his bedroom shouting at me about the rent. I couldn't really understand him. He was aggressive.
"The next I remember is him waving a knife in my face. I screamed at him to leave me alone.
"I came at me with the knife. He stepped forward and lunged up towards my throat. I put my right arm up. If I hadn't done that the knife would have got my throat.
"It cut my arm."
Keyleigh said she then remembered Charlotte Piccaver coming to her aid and then Ozen stabbed her (Wright) again in the side.
"I didn't see Darren," she said. "I started going to the floor in the kitchen. My next memory is seeing Charlotte lying on the bedroom floor. I don't know how she came to be there.
"Ozen was stood over Charlotte but I didn't see the knife. Then I saw Darren on the kitchen floor."
The jury has heard that emergency services arrived at the property just after 5am to find Charlotte Piccaver dead on the floor of Ozen's bedroom.
Mr Harwood, a DJ at the Magnet Tavern in Boston, was seriously injured and died later the same day in hospital.
Ozen claimed he was attacked by Keyleigh Wright and acted in self-defence.
But Mr Pini told the jury: "His actions went far beyond what would be considered a reasonable and proportionate use of self-defence.
"The injuries were caused by deliberately targeted thrusts to the neck. The intention can only have been to kill. This wasn't reasonable self-defence. This was total loss of temper in a fatal revenge attack."
Mr Pini said Ozen was angry after discovering that Ms Wright had complained to the property owner about the fact that he asked her for more money despite the fact she had paid rent in advance.
Ozen, who had financial problems after losing his job, apparently had not passed the rent money on to the main landlord and was in arrears.
Ozen, 41, of Red Lion Street, Boston, denies the murders of Darren Harwood and Charlotte Piccaver and the attempted murder of Keyleigh Wright on April 21 this year.
The trial continues.