The prosecution said Chloe and Smith had argued the previous evening, with Smith threatening to “stab her” several times.

Just before the attack, Dowling was with Chloe and spoke to Smith on the phone.

Smith was at her grandfather’s house in Austhorpe, east Leeds, with Rycroft.

The court heard a friend of Chloe’s who was on FaceTime with her that night said she heard Dowling answering his phone and heard Smith screaming: “Blake, I’m gonna smash your head in…you better not be with no girls…Chloe better not be there.”

When Chloe said that she was there, the witness heard Smith say: “I’m gonna stab you in your throat.”

The two girls agreed to fight, and Dowling booked a taxi to take Chloe to Smith’s home.

Prosecutor Mark McKone KC said Rycroft is accused of murder “by walking with Kayla Smith to the fight and by trying to film Kayla Smith using violence and by providing support to her, if needed”.

He added that Dowling knew Smith wanted to stab Chloe and by booking the taxi “played a part in organising the violence, assisted and encouraged Kayla Smith by taking Chloe to the scene for the purpose of fighting”.

The court was shown CCTV and video doorbell footage which showed Smith emerging from the annexe in her grandfather’s garden holding a knife.

She could be heard shouting: “Come on big girl”, and was then seen running back to the annexe with Rycroft after the stabbing.

Chloe, who had been stabbed five times in the neck and back, bled to death.

The trial continues.