A STUDENT filmed selling cocaine to under-cover police officers was freed yesterday, when a judge at the High Court in Edinburgh told him he did not want to interrupt his university course.

Euan Leask, 22, of Causewayside, Edinburgh, was told by Lord Cowie that he might be able to avoid prison if he kept out of trouble, and deferred sentence for a year.

The court was told of efforts Leask had made to get his life back in order since his ''stupid mistake'' of July last year. But his ambition to be a PE teacher lay in ruins because his conviction meant he would not be allowed to work with children.

At an earlier hearing, Leask, originally from Shetland, pleaded guilty to being concerned in the supply of cocaine and supplying it to under-cover detectives.

The court was told then how police had set up secret cameras in a city centre hotel as part of a major anti-drugs campaign code-named Operation Foil, Leask was caught on video as he handed over an ounce of cocaine in exchange for #1180.

He was arrested when he returned to the hotel in Edinburgh's Grassmarket the following afternoon for a further meeting with the supposed cocaine buyers.

Advocate-depute Jame Gilchrist, prosecuting, told Lord Cowie that Leask had been trapped by an operation set up during the first half of last year to infiltrate Edinburgh's drug community in an attempt to trace drug dealers.

Interviewed after his arrest, Leask, a PE student at Edinburgh University who was also working as a training instructor at Marco's Gym in Grove Street - told police he used drugs, including cocaine.

Defence advocate David Young said Leask had turned to cocaine after a number of personal problems, but, with the help of counselling he was now drug free and getting on with his studies.