A TEENAGER who threatened on Twitter to run into his high school with a knife and "massacre every child" he passed has been ordered to carry out 240 hours of unpaid work after a sheriff said the case had shocked the court into silence.

Andrew Ferguson, 17, made the chilling threat in a fit of anger, after a crisis meeting with teachers over his academic future.

He also posted disturbing messages about staff at St Mungo's High in Falkirk, just over 20 miles from Dunblane Primary School, where Thomas Hamilton shot dead 16 children and their teacher in 1996.

Falkirk sheriff William Gallacher said the posts were "horrific" and "could not be divorced" in people's minds from real massacres.

Ferguson, of Mariner Street, Camelon, Falkirk, admitted threatening behaviour and must also undergo a year of supervision.

Solicitor-advocate Martin Morrow, defending, said it was "never his intention" his comments would be read by his teachers.

But Sheriff Gallacher told him: "From time to time there are cases that provoke silence in the court. This was one, because of the horror provoked by the behaviour of your client."

He told Ferguson: "Anyone reading what you posted would have been distressed, alarmed and horrified."