Wolverhampton Crown Court was told a youth aged 16 stabbed Zane Smart in the Pendeford area of the city in May last year, after becoming "irate" that his victim was riding a bike nearby, following a dispute several months earlier.
The defendant, now aged 17, denies murder and possession of a knife in public without lawful excuse but accepts causing the wound which caused Zane's death, jurors were told on Tuesday.
Opening the Crown's case, prosecutor Harpreet Singh Sandhu KC said the youth, who cannot be named because of his age, had also posted a message on social media alongside a picture of Zane, saying which postcode he was located in.
The prosecutor told the court: "On the 27th of May 2022 two teenagers arranged to meet alone so that they could fight.
"Each teenager armed himself with a knife before they met to fight. When they met they used the knives they each had to attack the other.
"One of the teenagers was Zane Smart. He caused minor injuries to the other teenager... (who) used the knife he had to stab Zane Smart to the chest."
Mr Sandhu said of the defendant, who cannot be identified because of his age: "He accepts that on the 27th of May of last year he was carrying a knife in Pendeford, here in Wolverhampton. The question for you is likely to be why did he carry that knife?"
There had been "some tension" between Zane and the boy accused of murder, the court heard, before they took different routes from a car park near a chip shop to an area beside the Shropshire Union Canal.
Talking jurors through CCTV footage of the boys in the area of the chip shop, Mr Sandhu told the court: "It's the presence of Zane which made (the defendant) irate.
"The plan for (the defendant) and Zane to have a fight was now born. By now they were on the move - they were moving towards the canal.
"CCTV footage suggests that each of them took a slightly different route to the area of the canal.
"The fight itself was not caught on CCTV cameras and we therefore turn to witness evidence to assist us."
The court was told a witness had described seeing Zane after the stabbing as he ran over a canal bridge towards his bike.
Jurors also heard that the youth who is on trial suffered superficial injuries to his left arm, forehead and left wrist, along with damage to his clothing which "corresponded" with his injuries.
The trial continues.