A soldier was detained at Edinburgh Airport after accidentally packing a “flash eliminator” from an army rifle into his luggage.

Cameron Baker, who works in the armoury section, was stopped by security at the airport after an X-ray machine detected the device.

The 21-year-old, who serves with 3 Battalion The Rifles, had been hurrying to catch a flight when he mistakenly put the item in his bag.

Cameron Baker was given an absolute discharge at Edinburgh Sheriff Court on Wednesday.

The eliminators are used by the British Army to reduce muzzle flash when the gun is being fired to avoid giving away a soldier’s position to the enemy.

Baker appeared at Edinburgh Sheriff Court on Wednesday and pled guilty to possession of a firearm, namely a steel flash eliminator.

Fiscal depute Eilidh Yates said Baker had been set to depart on a flight from the airport and was passing through security.

She said the eliminator was detected by the X-ray machine at security and later found in a training shoe inside Baker’s holdall.

Ms Yates said such items were prohibited on flights.

Defence agent Chris Fehily said Baker had served in the army for four years.

The eliminator, which attaches only to a SA80 rifle, was of “utterly no use” to anyone but a soldier, he added.

The solicitor said Baker had been distracted by the appearance of a civilian delivery driver in the armoury. His client had also received some “bad news” about his grandfather and was eager to catch a flight to Exeter Airport to return home.

Mr Fehily said Baker had “thrown his belongings” into his bag and forgot about an eliminator which had been in his jacket pocket. He added: “It was absentmindedness and carelessness.”

Did you know you can keep up to date with the latest news by signing up to our daily newsletter?

We send a morning and lunchtime newsletter covering the latest headlines every day.

We also send coronavirus updates at 5pm on weekdays, and a round up of the week's must-read stories on Sunday afternoons.

Signing up is simple, easy and free.

You can pop your email address into the sign up box above, hit Subscribe and we'll do the rest.

Alternatively, you can sign up and check out the rest of our newsletters here.

Mr Fehily said Baker’s “own honesty” about the eliminator to security personnel had resulted in him being detained as they didn’t know what was the item was until he told them.

The court heard Baker, who has no previous convictions, is based at Edinburgh’s Dreghorn Barracks and his superior officer was at the hearing to support him.

Sheriff Peter McCormack gave Baker an absolute discharge - a move which leaves him without a criminal record.