A former prisoner who had a gun at his home was sentenced to a six-month community payback order at Jedburgh Sheriff Court.
Jay Hope was also ordered to complete 200 hours of unpaid work.
The court heard that police searched Hope’s home after a neighbour reported he had a gun. Hope, 33, of Allanfield Place, Edinburgh, admitted having an air pistol at Beattie Court, Hawick, where he was living on October 8.
Having previously received a jail term, Hope was banned from having a firearm until five years after his release date.
Hope claimed a girlfriend gave him the gun as a gift. Robert More, defending, said his client was not aware he was prohibited from having a firearm.
He addied: “He lived in the countryside until 2000, and used firearms for vermin control and shooting at targets.
“He says there was no ammunition for it.”