A teenager caused people to fear for their lives when he brandished what appeared to be a gun in Leicester city centre.
Zunaid Bobat was caught on CCTV in Humberstone Gate, where he fired one shot into the air before pointing the weapon at people in the street, including one at very close range.
Men and women can be seen running for cover on the CCTV footage.
Nobody was injured.
The weapon was never recovered after it was discarded by Bobat.
However, it was accepted during the trial that it would be considered an imitation firearm.
Bobat (19) was jailed for 18 months today after being found guilty, at an earlier hearing, of possessing a firearm or imitation firearm with intent to cause fear of unlawful violence.
The incident happened at about 6.30am on Saturday, March 22.
The court was told Bobat left nearby Vestry House, where he had been staying in a flat, and went to join a fight involving two groups of people in Humberstone Gate, some of whom were his friends.
CCTV footage shows him heading to Humberstone Gate and discharging the pistol, before aiming it at several people.
The shooting incident lasted between 20 and 30 seconds.
Recorder Russell Gumpert QC told the defendant, of Cavendish Road, Aylestone Park, Leicester: "There was a fight going on in the pedestrianised area of Humberstone Gate, in the centre of Leicester.
"Why you joined that fighting, it seems to me the only explanation was a telephone call.
"You disguised yourself and put on a face mask and, carrying an imitation firearm, ran down the street to where the fighting was taking place."
The court heard that a passer-by gave evidence of hearing at least one shot.
Mr Gumpert said: "We've seen CCTV which shows you making gestures to a number of different people who I judge to have been in fear of their lives."
He added: "It was clearly premeditated. You intended people to believe their lives were in danger."
With the help of further CCTV footage, police followed Bobat back to Vestry House, via Lee Circle car park where he had dumped his clothing.
He was arrested later that day.
In mitigation, Avik Mukherjee, defending, said Bobat's age and previous "low level" of previous offending should be taken into consideration.
He said: "There was only one shot fired. His actions did cause fear of violence, but I disagree it caused people to fear for their lives."
The court heard that Bobat had pleaded guilty, on October 31, to a separate offence of common assault in January, prior to the firearm incident.
Bobat was sentenced to two years in prison, reduced to 18 months due to his young age. He will serve the sentence in a young offender institution.
He was ordered to pay a £100 victim surcharge.
Speaking after the sentencing, Detective Constable Bill Beechey said: "Bobat will now spend a considerable amount of time behind bars.
"I hope this sentence reassures the public that he is no longer a risk to them.
"Fortunately no one was injured in this incident, however it could have been so much worse."
Detective Sergeant Dave Speight, from the Force Serious Crime Team, said: "Through the extensive CCTV network we were able to trace Bobat.
"Without this CCTV coverage we would not have been able to secure this conviction."
He added: "Leicestershire Police takes all firearms offences extremely seriously and will work tirelessly to investigate, gather evidence and put this before the courts.
"Be warned, if you get yourself involved in this type of criminal behaviour we will come looking for you.
"Incidents such as this are rare in our city and counties."