Two festival-goers were warned of the potentially fatal consequences of their actions after being caught trying to smuggle hundreds of pounds of drugs into T in the Park.
Dylan Connelly and Gavin Young, who appeared separately at Perth Sheriff Court, both admitted trying to take ecstasy into the Strathallan site.
Sheriff Lindsay Foulis pointed to the deaths at the 2016 event of Jim Richardson, Megan Bell and Peter McCallum, all of which were judged to be drug-related by experts.
Addressing Connolly, he said: “Apart from anything else, you don’t know what is in the tablets.
“This year at T in the Park there were a couple of drugs-related deaths.
“You may have had them for you and your chums but there may have been a reaction which resulted in the demise of your pals, or even you.”
To Young, he said: “You would have heard what I said to the other accused today and I say the same to you.
“There is also a risk that a conviction may have an effect on your employment prospects.”
Fiscal depute Craig Donald told the court Connelly was searched after appearing agitated while entering the venue and was found to have pills worth £570.
His solicitor told the court Connelly and his friends had paid around £80 each for the pills and they were to be shared out once they were on site.
She said Connelly had been naive enough to agree to take charge of the tablets until the group was inside and that his family had taken a “dim view” of his actions.
Mr Donald said Young was caught in an area where police sniffer dogs were operating and produced £610 of drugs from inside his boxer shorts.
Young, 18, of Cumbernauld, pled guilty to being concerned in the supply of ecstasy at T in the Park on July 7, while Connelly, 19, of Milesmark, Fife, admitted that on the same day he was in possession of the Class A drug with intent to supply.
Sheriff Foulis ordered each to carry out 200 hours of unpaid work.