A gang who accidentally filmed themselves packaging drugs to fly them by drone into a prison have been jailed for nearly four years.

Paul Reilly, 32, and Michael Martin, 34, had no idea the drone's camera was recording footage of them as they prepared to fly nearly £3000 pounds worth of drugs into Perth Prison.

Footage played in court clearly showed the faces of the duo - along with a mystery third man - as they hid drugs inside Kinder Eggs.

The gang also managed to film the door number of the house they were operating from and a car parked outside which belonged to them.

The footage was recovered by prison officers when the drone, with the drugs still attached to it, crashed and was found lying inside the prison yard.

The film was analysed and Reilly and Martin were quickly identified from the footage by police officers.

On Tuesday at Perth Sheriff Court, Reilly, from Cumbernauld, admitted being concerned in the supply of drugs on September 22, 2017.

He admitted supplying cannabis, cannabis resin, buprenorphine and etizolam from East March Street, Kirkcaldy.

Fiscal depute John Malpass told the court: "Paul Reilly was identified from CCTV footage on February 15.

"He has previous convictions for disorder, violence and drugs offences and has served time in prison."

Reilly also admitted failing to turn up for a previous court hearing and Sheriff Lindsay Foulis jailed him for a total of 33 months.

Sheriff Foulis said: "The observation I would make is that as the packaging of the drugs involved a drone it was perhaps obvious to anyone with a knowledge of drugs practice that this supply operation was certainly not run of the mill.

"This is your third conviction for being concerned in the supply of drugs and account has to be taken of that."

While Reilly was being hunted by police in May this year, Martin, from Kirkcaldy, went on trial and was found guilty by a jury of supplying drugs into Perth Prison. He was jailed for a year.

Martin accidentally recorded over 18 minutes footage of the gang preparing the drone with a package.

In that case, fiscal depute Michael Sweeney said: "If there was an award for the movie with the most inept director, then it would have been won by the accused."