A teenager was stabbed to death in an alleyway after he punched a man who had threatened a group of people, Newcastle Crown Court has been told.
Connor Brown had confronted Leighton Barrass who was threatening the group with a knife outside the Borough pub in Sunderland in February.
Barrass then stabbed the 19-year-old, who died later, the court heard.
Ally Gordon, 19, of Pulmuir Road, and Leighton Barrass, 20, of Hartside Square, have denied murder.
Prosecutor Jamie Hill told the trial that Mr Barrass had moved towards a group of people in the alley saying he "would stab any one of them."
Mr Brown then stepped forward and punched him to "stop him carrying out his threat" only for Mr Barrass to produce a knife, jurors heard.
The jury also heard that Mr Brown tried to fight back as the two crashed into bins but was stabbed five times, including a fatal blow to the heart.
He collapsed soon afterwards and died later that night in Newcastle's Royal Victoria Infirmary.
It is alleged that Mr Gordon joined in the attack by kicking and stamping on the victim.
The trial heard that there had been an earlier confrontation when Mr Barrass and Mr Gordon had attempted to sell drugs to Mr Brown and his friend Stephen Nunn.
It also heard Mr Barrass had allegedly taken £5 from Mr Nunn and that Mr Nunn punched him giving him a bloody nose in the moments before Mr Brown was attacked.
The jury was told that Mr Barrass had pleaded guilty to having a knife but Mr Gordon denied a similar count.
The trial continues.