Shane Mayer, 21, died after being stabbed in the leg near Gabba's Bar in Darlaston following a confrontation between two groups, rupturing his femoral artery.
His friend had been involved in an altercation with 21-year-old Lewis Green earlier the same night, jurors at Wolverhampton Crown Court were told.
Prosecutor Mr Michael Burrows said Green then "summoned the troops", returning to the scene on Forge Street in July 2019 with Ramani Sanderson, 20, Joseph Till, 21, and Kamron Reid, 20, who were "looking for trouble".
Sanderson then produced a sword, with a 30-40cm (12-16inch) blade, from his trousers and "lunged" forwards at Mayer, striking him on the leg, Mr Burrows told jurors during his closing speech. The victim attempted to flee but Sanderson gave chase, stabbing him again, this time in the back, it was said.
All four alleged to have taken part in the attack on Mr Mayer are charged with murder. Mr Burrows said they all participated in the attack and "shared the intention to kill or cause serious injury".
Claims any of the four were acting in self-defence or as peacemakers were not credible, the prosecutor said.
He told the jury: "The fact he (Sanderson) had the sword out that early shows what was intention. He had it out for use.
"He wasn't there for peace, he had it out for a reason. He was looking for an excuse to use this sword."
Mr Burrows added: "He intended at the very least to cause serious injury if not kill him. He did both. He caused serious injury and ultimately killed him."
The prosecutor asserted it was not possible for the other three not to know Sanderson was armed.
"Kamron Reid and Joseph Till were with him for over an hour before the fight. The prosecution say they must have known of that sword. They were his friends. There was no reason to hide that sword from them. If he had that sword in his trousers he must have known."
Mr Mayer died three days after the attack when a decision was made to turn off his life support machine.
Sanderson is also charged with assaulting a taxi driver three months earlier when it is alleged the victim was chased to a car park and struck on the head with a knife.
Mr Burrows said the incident showed his "willingness to use a knife in unlawful violence".
Reid, of Herberts Park Road, Bloxwich; Green, of Heathfield Lane West, Darlaston; Till, of Summer Street, Willenhall; and Sanderson, of Walsham Road, near Peckham, London, all deny murder. Sanderson also denies possessing a bladed article in a public place.
The trial continues.