A man who hid an illegal pistol at his home was jailed for five years at Lincoln Crown Court.
Darren Mason was arrested after police raided his property at Washingborough in November.
Mark Watson, prosecuting, said the illegal Glock pistol had been dismantled with the parts hidden around the house.
“The information leading to the search came from information provided to the police.
“The search revealed the components of a viable firearm hidden around the house.”
The barrell and chamber of the pistol were found hidden in the cavity between the walls of two bedrooms.
The magazine was in a wardrobe and other parts were gound inside a box of toys.
When Mason was interviewed he claimed the pistol was a replica Glock firearm which he had bought in Skegness.
He denied the weapon was capable of being fired but after it was put back together an examiner was able to fire it during tests.
Mr Watson said that checks revealed the weapon had been deactivated in 2009 but that had subsequently been reversed and it was a viable firearm when it was found.
Mason, 47, of Ally’s Way, Washingborough, admitted possession of an illegal weapon on November 24, 2017.
Judge Simon Hirst, passing sentence, told Mason: “In interview you told the police a pack of lies saying that you bought this at a market in Skegness thinking it was a replica.
“This was a viable firearm and it remains a viable firearm.”
David Eager, in mitigation, said the pistol had not been used.
He said that although Mason had a “quite extensive” record of previous offences none of his past convictions were to do with firearms.
“He bitterly regrets this offence. He has now lost his home.”