Police raiding an east London drugs factory discovered a firearm and 300 rounds of ammunition.
Officers had Thompson Caninhas, 30, under surveillance when he was observed lugging a large number of heavy packages.
They arrested Caninhas as he took a suspicious bag filled with drugs out of his car.
Detectives then conducted a search of a property on Downs Road, Hackney in July last year.
A room inside had been dedicated to the preparation and packaging of heroin and cocaine.
The setup, controlled by the gangster, included a ten tonne drug press, bags of brown powder and blocks of various substances and kitchen utensils.
A 9mm self-loading pistol and hundreds of ammunition rounds of various calibres were hidden inside socks in a drawer.
At Snaresbrook Crown Court on Tuesday, Caninhas, of St John’s Way, Islington was jailed for nine-and-a-half years for possessing a prohibited weapon and being concerned in the supply of Class A drugs.
Detective Inspector Damian Hill, who led the Metropolitan Policeinvestigation, said: “Drugs have devastating impacts on communities and guns lead to the serious violence on the streets of London.
“Our team collaborates with local officers to dismantle firearm-related crimes in Hackney and Tower Hamlets.
“The swift action taken by the officers demonstrates our dedication to maintaining public safety and combating criminal activity within London.
“To further enhance our efforts, we have also increased patrols in high-risk areas serving as a visible deterrent to potential offenders and reassuring the public of their safety.”
The investigation was launched by the Met’s Specialist Crime in collaboration with local officers to tackle the drugs trade and related violence in Hackney and Tower Hamlets.