An armed man who turned up to Dalton Junior & Infant School, told a caretaker terrorists had planted bombs in the basement and the SAS were on their way.

Ian Barraclough, 64, appeared in custody at Kirklees Magistrates’ Court yesterday accused of possessing an offensive weapon – a hammer – in a public place.

At an earlier hearing he pleaded guilty to that charge and a further one of possessing a six inch knife on school premises.

Andy Wills, prosecuting, said the offences occurred on April 14 at 8.45am when the defendant, then aged 63, told the caretaker he “needed to get into the basement to sort the bombs out.

“There’s another six or seven of us coming, up, SAS.”

The shocked caretaker ran into the school and locked the door before phoning the police. Fortunately it was Easter time so no children were present.

In interview the defendant told officers: “It was all a dream," adding he thought terrorists had planted a bomb.

In mitigation, Cheryl Ford, said: “The offence was linked to mental health problems and alcohol consumption.

“He was in a dream-like state. He woke up.”

She said he had been kept in custody for a month mainly for his own protection.

The bench imposed a 12 month community order as a direct alternative to prison and imposed an alcohol treatment order.

They also ordered him to pay £325 in costs at £30 per month.