A court has heard a teenager who brought traffic in Dunfermline town centre to a halt by throwing bricks at vehicles wanted to gain attention on social media.
James Haggerty, 18, who threatened police with a pole and hurled rocks at buses, asked afterwards how many comments the incident would receive on Facebook and YouTube.
The town centre traffic was at gridlock during a tea-time rush hour last month as Haggerty threw stones and rocks at passing vehicles, prompting an armed response from police.
Haggerty, who remains behind bars at a Polmont YOI, appeared at Dunfermline Sheriff Court.
Depute fiscal Sarah Lumsden said the incident occurred on January 23 after police tried to execute an arrest warrant granted after Haggerty failed to turn up for a court date.
At around 3.40pm a detective was on the phone to Haggerty when the teenager told him: “Look over to B&Q.”
Haggerty had climbed up on to a ledge above the car park at a retail park and told police he had taken “14 Valium, speed and four bottles of alcohol”.
Haggerty began to throw stones at police vehicles arriving at the scene, striking their windows.
Road closures were put in place and extended as the incident continued.
He shouted at police: “Come on, do you want some?”
Haggerty had been bare-chested at first but as heavy rain fell he put on his T-shirt.
However, he continued with his belligerence throwing objects at police negotiators when they arrived.
Other officers were called in from Glenrothes and Edinburgh and protective clothing was used as Haggerty brandished a metal pole.
He also continued to throw stones at police and rocks at passing buses and so both carriageways of Carnegie Drive were closed.
A group of people gathered and there was “hostility shown from the crowd to the accused”.
Haggerty finally gave himself up to police at 5.40pm and he was taken to hospital for a check-up.
“On being assessed at the Victoria Hospital he made comments about how many comments he would get on Facebook and YouTube,” added Ms Lumsden.
He pled guilty to breaching the peace and culpable and reckless conduct.
David Bell, solicitor for Haggerty, of Mackie Place, Dunfermline, said: “A feature of his behaviour has been spectacular tantrums and this takes it to a new level.”
Sheriff Chris Shead called for reports and refused bail. Haggerty will be sentenced on March 21.