A teenager was "ruthlessly hunted down" through a town and subjected to a "swift, bloody and merciless" knife attack, a court has heard.
Harry Baker's body was found early on 28 August 2019 at a container port in Barry, Vale of Glamorgan.
The 17-year-old, from Cardiff, was involved in a drug feud with the defendants, Newport Crown Court was told.
Six men and a 16-year-old boy all deny murder.
Raymond Thompson, 47, Lewis Evans, 61, Ryan Palmer, 33, Peter McCarthy, 36, all of Barry, Leon Clifford, 22, Leon Symons, 21, both of no fixed address, and a 16-year-old boy, all deny murder.
Clifford has already admitted manslaughter and told police he climbed into the compound and stabbed Harry.
Paul Lewis QC, prosecuting, said Harry was found lying face down on the ground.
"He had been repeatedly stabbed and his clothing had been stripped from his body," he added.
A post-mortem examination found Harry had been stabbed nine times, including one wound to his head which had fractured his skull.
The fatal wound originated from a stab to the abdomen which severed a vital blood vessel, causing him to bleed to death.
Harry had been "touting for business" in Barry with his friend Louis Johnson while visiting drug users Poppy Davies and Michael Sparks at an address in Northcote Terrace.
Ms Davies had seen Harry carrying knives and Louis a machete on previous occasions, Mr Lewis said.
Four of the defendants - Mr McCarthy, Mr Palmer, Mr Symons and the youth - then visited Ms Davies soon after Harry and Louis.
"There comes a point when the decision is made to hunt Harry Baker down," Mr Lewis told the jury.
CCTV footage was shown to Newport Crown Court of a Nissan Juke, apparently driven by Mr Evans, dropping off some of the defendants at Little Moors Hill, where the prosecution said Harry and Louis were "ambushed".
The prosecution said Harry and Louis approached the gang, led by Mr Thompson, before a 15-minute chase began.
They ran away from the "armed deadly gang" for about a mile through the town, until they tried to hide in the secure docklands yard.
"He [Harry] thought he would be safe there but he was wrong. His killers were determined," Mr Lewis added.
"They subjected him to a swift, bloody and merciless attack before they fled the scene."
Police forensics officers concluded Harry was likely to have been attacked as he was trying to escape the compound by climbing the fence.
CCTV footage showed Mr Symons, Mr McCarthy and Mr Palmer scaling the fence at the yard, and after gaining entry Mr McCarthy handed Mr Symons a knife. Mr McCarthy and Mr Palmer were carrying pieces of wood.
The court was told Louis had escaped, but had not co-operated with the police inquiry.
The prosecution claims Mr Clifford and Mr Symons entered the compound with knives and Mr Palmer and Mr McCarthy were carrying lengths of wood.
A lack of CCTV inside the yard meant it was not possible to say who delivered the fatal blows, the court heard.
However Mr Lewis said all the defendants were part of a "joint enterprise" to murder.
"All of them shared a common intention: that Harry should die, or suffer very serious injuries," he added.
The prosecution also alleges Mr Evans not only acted as the driver - transporting other defendants around Barry in his Nissan Juke - but he also provided two knives from his own kitchen to enable the murder.
The court was shown CCTV footage which the prosecution said showed Mr Evans, still driving the Nissan Juke, picking up the 16-year-old defendant, Mr Clifford, Mr Symons, Mr McCarthy and Mr Palmer from a road near to the yard after Mr Baker's murder.
Mr Palmer, Mr Symons, Mr McCarthy, Mr Thompson, and the boy also deny violent disorder.
Mr Evans denies a charge of assisting an offender.
The trial is expected to last six weeks.