A man caught with a sawn-off shotgun, revolver and bullets has been jailed for almost seven years.
Sean Gillan was snared after police got a tip-off on the day the 25-year-old took hold of the deadly haul.
He had agreed to keep watch in a bid to repay a large drug debt.
The raid occurred at a house in Gorebridge, Midlothian, last August 26.
On Thursday, Gillan pled guilty at the High Court in Glasgow to possession of the firearms and ammunition.
Lady Stacey sentenced him to a total of six years and nine months.
The hearing was told Gillan being found with the guns was linked to a drugs bust in 2017, which eventually saw him jailed.
His QC Brian McConnachie said: “At that time, there was a substantial recovery of drugs.
“As a result, he was in debt to those who supplied him.
“Even as we stand here now, he is still £5000 in debt as a result of the seizure.”
The defence advocate added Gillan was “prevailed” upon by the dealers to look after the weapons.
Prosecutor Blair Speed earlier told the hearing that the firearms were found to be in working order.
Revolver ammunition was discovered, but could not be used with the weapon found.
Sentencing, Lady Stacey said: “You kept these guns having agreed to do so for a short period in respect of a drug debt.
“The police must have had intelligence as they came on the day you got them.”
Gillan had also been charged with abducting and assaulting a man to the danger of his life in Penicuik, Midlothian, the day before the raid.
This allegedly involved the use of a gun and threats to kill him if he did not commit a robbery at a jewellery store.
However, prosecutors accepted his not guilty plea to the allegation.
STV News is now on WhatsApp
Get all the latest news from around the countryFollow STV News
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country