A boy was caught with an air gun in Corby's town centre when he was just 14.
The teenager, who cannot be named for legal reasons, admitted possessing the weapon at the Oasis Retail Park off Alexandra Road in January.
After it was found to be a BB gun he was arrested for breaching firearms laws.
The boy, who is yet to take his GCSEs, was ordered to appear before magistrates in Northampton last month.
Magistrates referred him to a youth offender panel - a way of dealing with first-time offenders under the age of 17 - for three months.
The panel will draw up a contract of behaviour he must comply with.
If he fails to meet the requirements of the contract he will be sent back to court to be re-sentenced.