Umar Javid, 19, of Hastings Road, had pleaded guilty to possession of a prohibited firearm and ammunition, two charges of possession with intent to supply Class A drugs and possession of cannabis.
It was reported to police earlier this year that Javid was believed to be in possession of a firearm.
In April, armed officers recovered a gun from Javid’s bedroom and established that it was a blank firing weapon that had been converted into a viable firearm.
Fire destroys huge area of land at Great Denham Golf Course
Anglian Water rules out hosepipe ban for Bedford households
Bedford bus company revises timetable after passenger numbers review
'Sophisticated crime group' behind £1.1m stolen from Luton council that was destined for a Bedford school
Man charged with burglary and assaulting an emergency worker in Flitwick
Prior to this, on 21 June last year, Javid was arrested when officers stopped a vehicle in Bassett Road, Leighton Buzzard.
He was captured as he dropped cling-filmed packages containing Class A drugs while he attempted to run away from police.
He also had a small amount of cannabis in his possession as well as a mobile phone, which when investigated indicated he was involved in dealing drugs.
Javid appeared at Luton Crown Court on Monday, June 8, via video link.
He was handed a five-year term for the firearm and ammunition offences, as well as custodial sentences of three years for both the drugs supply offences, which will be served concurrently.
Javid will serve his five-year sentence in a young offender institution.
It marks the latest major sentence secured by Bedfordshire Police's Boson guns and gangs team, which has secured almost 500 years in jail terms for offenders linked to serious violence over the past two years.
Detective Sergeant Wil Taylor, from Bedfordshire Police’s Boson Team - dedicated to tackling gangs and serious youth violence, said: “We are really pleased to see Javid behind bars.
"Drug dealing and firearms cause significant harm to our communities and we will never tolerate this in our county.
“We hope this sentence serves as a warning to those who are involved in the supply of illegal drugs and guns in Bedfordshire.
“We must also commend those who reported the matter to the police. We cannot tackle these issues alone, and work together with our communities and partners to disrupt this type of criminality.”
Anyone with any information about criminal activity can contact Bedfordshire Police online or by calling 101. Alternatively you can call Crimestoppers anonymously on 0800 555111.