Raheem Wilks was shot once through his heart from the back as he "passed the time of day" in a barber's shop in the Chapeltown area of Leeds in January, a court heard.
Opening the trial of five men accused of murdering Mr Wilks, prosecutor Dafydd Enoch QC said the teenager was specifically targeted and was a member of a gang called The Flock.
Mr Enoch told Leeds Crown Court: "He was shot in the heart once, suddenly, without warning as he passed the time of day in an area in which he was familiar.
"It was his stomping ground."
He said it happened at lunchtime, in broad daylight and in front of a number witnesses but "nobody who was present at the shooting has been able to help the police".
The prosecutor said: "It was, you may think, a killing which was designed to send a message."
And he said: "This has all the hallmarks of a gangland shooting."
Mr Enoch said defendant Jaydn Manners was "almost certainly the actual shooter" and he went to the scene in a car with Keal Richards, Keiran Hunt and Tremaine Wisdom after a phone tip-off about Mr Wilks's whereabouts from the fifth defendant, Cornelia Benjamin.
He said this was a "joint enterprise" case.
"Mr Richards and his co-defendants organised and executed this killing," the prosecutor said.
"It smacked of revenge.
"Mr Richards was to celebrate it on social media after the event."
Mr Enoch described to the jury of four men and eight women how, within a couple of hours of the killing, Richards recorded himself on Snapchat apparently celebrating the killing.
He said Snapchat stories are not normally retrievable, but this message was obtained by police after new cooperation between the UK and United States authorities.
Mr Enoch said Richards, who was shot himself in 2016, is a convicted drug dealer, as is Manners.
The prosecutor told the jury that Mr Wilks had "got himself at a young age into bad company".
He showed the court a picture of the deceased young man making a gesture associated with The Flock gang.
"The raison d'etre of The Flock was primarily associated with a group of young men for the purpose of crime," he said.
Mr Enoch said this included supplying drugs and "an inevitable association with firearms".
"There is an abundance of evidence that young Raheem Wilks was a member of The Flock," he told the court.
Richards, 21, of Francis Street, Leeds; Manners, 24, of Louis Street, Leeds; Hunt, 29, of Roundhay Road, Leeds; Wisdom, 29, of no fixed abode, and Benjamin, 21, of Reginald Steet, Leeds, all deny murdering Mr Wilks.