They ruled to impose the minimum period laid down by parliament on Guy Whitelaw given the circumstances would be to pass “an arbitrary and disproportionate sentence”.
Lord Clarke, sitting with Lord Philip, substituted a six-month term on Whitelaw, also known as McCall. He has already served the equivalent of 16 months in jail, they were told.
Whitelaw, 29, earlier admitted breaking into the home of a 63-year-old woman on 19 March and stealing jewellery, coins, money, a television remote control and a handgun.
A cashbox and its contents were also taken.
Police inquiries led them to an address in Forres, Morayshire, where Whitelaw was staying. He at first denied involvement in the housebreaking, but revealed information about a gun. He later told officers that after he discovered he had stolen a gun, which was in the cash box in a safe, he immediately decided to bury it “because I can get five years straightaway for it”.
He offered to take officers to the weapon and at the back garden went straight to a tuft of grass under which it was hidden.
A judge earlier heard Whitelaw “seemed anxious” that if he faced prosecution for possessing the weapon, the pensioner should be charged with not having a permit.
The revolver had belonged to her late husband and she had “effectively forgotten it was there”, the judges heard.
Illegal possession of a gun carries a minimum of five years’ jail under the Firearms Act unless exceptional circumstances can be shown. After Whitelaw admitted the firearms offence at the High Court in Edinburgh earlier this year Lord Woolman said he saw no exceptional circumstances.
But defence counsel Claire Mitchell told the Court of Criminal Appeal in Edinburgh that the judge had erred.
Miss Mitchell argued it was “an absolutely exceptional case”.
She said: “We have an appellant who did not know he was coming into possession of a handgun. It was never his intention to come into possession of a firearm.
“He did not set out to have this item, nor is it an item that he kept in his possession. This person found himself in possession of a gun and thereafter did everything he could to dispossess himself of it.
“He realised he had the gun and said ‘I could get five years for this’ and got rid of it.”
Lord Clarke said: “The Crown accepted that he did not know about the presence of the gun in the house and did not discover it until he opened a cash box a short time after leaving the house.”