Mohamed Abdillahi is accused of stabbing 27-year-old Augustus Fenton to death in west London with four others, three of whom have never been traced.
The defendant, from Somalia, was ordered to leave England in 2013 and he contacted immigration officers after the killing, it is alleged.
Abdillahi admitted violent disorder but denies murder and wounding with intent.
Prosecutor Oliver Glasgow QC spoke at the Old Bailey at the beginning of the trial on Wednesday September 20, and said: “On March 28 of this year, Augustus Fenton was attacked and stabbed to death by a group of young men in Southall.
“Augustus Fenton was chased and set upon in the middle of the road.
“He was punched and kicked by the young men, including this defendant.”
'Struck with a baseball bat'
As the attack unfolded, the 27-year-old victim called his brother Elijah Fenton, 31, in the panic to get to safety.
However, Mr Glasgow told the court “help was not to reach him in time”.
He added: “Augustus Fenton was spotted by the group of young men, three of whom ran down the road towards him, this defendant is one of those three.
“During the course of that attack, he was stabbed several times and struck with a baseball bat.”
Elijah Fenton arrived at the Southall street shortly after, but the group set about attacking him, it is alleged.
He was stabbed in the palm and buttock but managed to survive the attack, the Old Bailey heard.
“This defendant contacted the immigration authorities and tried to arrange to be repatriated to Somalia, his country of birth,” Mr Glasgow said.
“Having been identified, the police managed to arrest him about a week later.
“Despite having managed to identify three of the other attackers, the police have been unable to locate them and their whereabouts, even to this day, remains unknown."
He added: “Why was he so desperate to leave this country and return to Somalia?
“He was born in Somalia on September 16, 1992, and is in this country illegally.”
The defendant, of no fixed address, denies murder and wounding with intent.
The trial continues.
Keep up to date with the latest news in west London via the free getwestlondon app.
You can set up your app to see all the latest news and events from your area, plus receive push notifications for breaking news.