A jury has been shown CCTV footage of the fatal stabbing of a young mother during an argument with a 16-year-old outside her home.
Paige Gibson, 23, was knifed in the chest outside her flat in Halifax, West Yorkshire, on the 7 June.
Prosecutors at Bradford Crown Court allege Miss Gibson had agreed to sell some items for the teenager and a friend so they could buy drugs.
The 16-year-old, who cannot be named for legal reasons, denies murder.
The jury were shown the recording from a first floor corridor at Weavers Brook in Cumberland Close which showed the teenager standing outside the doorway of Miss Gibson's flat.
She is then seen coming out of the flat and arguing with the boy.
Her partner, Aaron McIntosh, could also be seen in the footage trying to take hold of her, but when a scuffle broke out the boy is alleged to have stabbed her in the chest with a kitchen knife.
Prosecutor Nicholas Campbell QC said the stabbing took place in "a dynamic situation" and it appeared neither Miss Gibson nor Mr McIntosh were aware she had been seriously injured.
Mr Campbell said before the stabbing the defendant had repeatedly visited the flat to try and get his money or property.
He said the jury would hear evidence the teenager had returned to the flat below and told a woman: "Give me a knife. I need a knife."
"I'm gonna stab" her, he said.
Mr Campbell said the boy later returned in distress and told his friends he had stabbed Miss Gibson.
The teenager has denied the murder charge, but Mr Campbell said the defendant did accept that he had stabbed Miss Gibson.
He told the jury they had to be sure the teenager had acted unlawfully and was not acting in self defence.
"It is not necessary for the prosecution to prove that he had an intention to kill Paige Gibson," he said.
"To be guilty of murder (he) must have intended to cause, at least, really serious harm to Paige Gibson."
He added the defence had also raised the issue that an "abnormality" of the teenager's mental functioning meant his responsibility for his actions was substantially diminished.
The trial continues.