An American airline pilot has admitted carrying a high voltage stun gun in his luggage at Edinburgh Airport.
Ryan Cecil, 56, was found carrying the weapon in his carry-on luggage as he attempted to board a flight he was piloting to New York in January.
Cecil, a captain with United Airlines, initially claimed it was a torch, but later admitted it was a stun device which is legal in most US states.
He claimed he had accidentally carried it with him, and was ordered to pay a fine of £8,500 as an alternative to a prison sentence.
Edinburgh Sheriff Court was told the pilot had flown from Newark Airport in the US two days previously and was flying back home when he was stopped at about 07:30 on 20 January.
Prosecutor Matthew Miller said a security officer discovered the stun gun hidden inside a pair of gloves but Cecil had taken hold of the weapon and claimed it was just a torch.
Police were called after it was identified as a stun gun.
'Unaware' it was in his bag
Cecil was taken to Livingston police station where he told officers: "I am in violation but it was accidental."
The pilot was held in custody for two nights before being released on bail.
Cecil returned to court on Tuesday where he pleaded guilty to possessing a prohibited weapon that was designed or adapted to discharge a noxious liquid, gas or electricity.
Lawyer Mathew Nicholson, defending, told the court: "He was completely unaware it was in his bag. That bag went through security checks and went undetected and he spent two nights in Edinburgh before planning on flying back.
"He fully accepts this was gross carelessness by him and the item in question is not a regulated item in the United States."
Mr Nicholson said Cecil has been as a commercial pilot for 23 years and had an exemplary record. He had previously served in the armed forces, reaching the rank of lieutenant colonel.
The court heard Cecil was "deeply embarrassed and ashamed" at appearing in court but his employers were keen to keep him on.
Sheriff Charles Walls said: "This is a very serious offence and ignorance of the laws of Scotland or in any country is not an excuse.
"However, I accept what has been said on your behalf and I accept you have been of previous good character with no previous convictions and while I can impose a custodial sentence I don't propose to do that today."