A "gang leader" convicted of possessing a firearm and causing grievous bodily harm with intent has been jailed by a Bedfordshire court.
Ashley Thomas, 22, of Roxborough Road, Harrow, fired into a crowd outside Traffik nightclub in Luton in May last year, injuring one man.
He was given an indeterminate sentence at Luton Crown Court and must serve at least five years and 166 days.
He was found not guilty of an alternative charge of attempted murder.
Judge Andrew Bright QC said: "This was a premeditated shooting with a loaded gun, which makes it a very serious offence indeed.
"I am quite certain your purpose in coming to Luton was not to attend the carnival but a criminal one and you were the leader of a gang of young men.
"I am also satisfied that you have been associating with the criminal fraternity who use firearms.
"You are fortunate that the shots you fired did not kill the victim or some innocent bystander."
The court heard that Thomas had come to the Bedfordshire town on the day of last year's Bank Holiday carnival - 26 May - which attracts 150,000 visitors.
The man who was shot, 23-year-old Opeh Akinboro, from south London was said by the Judge to be "no innocent bystander".
He discharged himself from hospital, despite having a bullet lodged in his groin and told police he would not support any prosecution.
Defence barrister, David Highes said: "He could not get out of Luton quick enough. Why he took that attitude no one knows."
The judge said he believed the incident was "drug-related", although Thomas had previous convictions relating to the possession of cannabis.
The prosecution said he fired the gun when he was assaulted during an angry confrontation outside the club.
Prosecutor Jane Bickerstaff said: "He took out the gun he had on him and fired it more than once at close range into the group of people."
Thomas fled the scene in a BMW at high speed and without lights to the outskirts of Luton where he crashed and was caught by a police dog as he tried to escape.