Umair Karim, aged 22, and Muhammed Hassan, aged 27, came to the attention of police during an investigation into an unrelated case.
Detectives applied for a warrant to search Karim’s home and discovered a treasure-trove of mobile phone messages discussing the procurement and use of a handgun.
The messages showed that Hassan had approached Karim with the intention of securing a firearm from him.
Using the nickname “Doctor” Hassan made clear his desire to get hold of a weapon.
Karim, meanwhile, bragged about his access to various lethal firearms including a Mac 11 machine pistol and an AK-47 assault rifle.
The messages also contained detailed exchanges about the dealing of drugs.
After his arrest Karim admitted to holding the conversations but claimed he was bragging and had no actual means of securing a firearm. His knowledge of guns, he claimed, had been garnered by watching videos on the internet.
Hassan, of Serpentine Road, Bradford, declined to answer any questions.
Both men appeared at Nottingham Crown Court yesterday (Tuesday) where they admitted to charges of conspiracy to transfer a firearm.
Karim, of Ferngill Close, The Meadows, also admitted being concerned in the supply of class B drugs, and Hassan admitted being concerned in the supply of class A, class B and class C drugs.
They were each jailed for five years and three months.
Detective Sergeant Julian Eminson-Ferry, of Nottinghamshire Police, said: “Nottinghamshire Police treat all firearms offences with the utmost seriousness and are committed to keeping dangerous weapons off our streets.
“As these two men have just discovered to the cost even the discussion of such offences can have incredibly serious legal consequence. Because as this case proves we do not need to recover an actual weapon to prove a conspiracy to acquire and use one.
“On this occasion we were able to fall back on a treasure trove of mobile phone evidence to put both of these men behind bars. I hope this case serves as a warning to others of our resolve to crack down on even the slightest hint of gun crime on our streets.”