A pre-arranged meeting between rival armed gangs in Bradford city centre erupted into sudden violence that saw young men facing off with large knives and a BB gun as innocent bystanders watched in horror.

CCTV footage of the shocking three-minute incident played at Bradford Crown Court showed 18-year-old Aleem Shafi-Bux getting into a verbal confrontation with two others, who punched and kicked him to the ground.

A rival pulled out a gun and pointed it at him at close range as he scrambled away. A friend of Shafi-Bux then advanced on the other gang brandishing a machete.

Shafi-Bux handed a “substantial” sheath knife to another unidentified man who, alongside the man wielding the machete, chased the rival gang across Centenary Square prompting the gunman to fire several shots.

Shafi-Bux and the machete man then ran away, and Shafi-Bux was caught on CCTV secreting the sheath knife in his waistband. It was later recovered by police.

Prosecutor Michael Smith told the court that the terrifying daylight attack took place at around 3pm on March 4 just feet from members of the public – including a mother and toddler.

Mitigating for Shafi-Bux, a college student with no previous convictions, Lauren McBride said he had become embroiled in a petty fall-out with another man that had escalated over a number of months.

She said he had received threatening phone calls and social media messages with one warning: “The shooters are coming for you.”

On the day of the incident he had been “jumped” and attacked by the same men he was later to meet in Centenary Square.

She said he was “initially a victim” before making the “stupid decision” to hand his knife to another person.

Speaking via video link from HMP Doncaster Shafi-Bux, of Burwood Fold, Queensbury, read a letter to the court in which he apologised to those that witnessed his actions and said: “The crime I committed does not represent me as a person.

“I will not commit a crime again.”

He had previously pleaded guilty to affray and possession of an offensive weapon in a public place.

Mr Recorder Simon Jackson KC described the incident as “a melee” overlooked by “a horrified public”.

He added: "Day in, day out we read tragic stories of young teenagers stabbing each other in our cities.

“The reality is that you did pass your large sheath knife to someone who could have killed somebody. You would have armed somebody who stabbed somebody to death.

“You have to reflect on how you could so easily have faced a murder charge as the person who provided the weapon.

However taking note of his age and lack of previous convictions Recorder Jackson opted to “step back” from an immediate custodial sentence.

He sentenced Shafi-Bux to a total of 18 months in prison suspended for two years, imposed a five-month electronically monitored curfew from 8pm to 6am, and banned him from the city centre for three years.

He also ordered him to carry out 175 hours of unpaid community work and to undertake 25 rehabilitation activity requirement days.

He ordered the sheath knife to be forfeited and destroyed.

Recorder Jackson said: “There may be some people who think, ‘What hasn’t this young man been sent immediately to custody?’

“These [measures] are designed to ensure that you turn away from this pattern of behaviour which ends in tragedy for so many young people in this city and elsewhere. The outcome is in your hands.”