Staff and pupils were arriving at Fir Vale School on the morning of February 13 this year, when Aqib Quamar appeared in a black BMW and acceleratedÂ into the gates, forcing them open.
The 23-year-old, of Firth Park Road, Sheffield,Â thenÂ drove at speed in circles around the school grounds, Sheffield Crown Court heard, before repeatedly ramming the front doors.
He got out of the car, saying '˜I've got a bomb in the car and I'm going to blow it up', before grabbing a piece of metal and smashing windows.
Quamar admitted a string of offences, including communicating false information, dangerous driving and aggravated vehicle taking, for which he was sentenced today to a total of 26 months imprisonment.
Zaiban Alam, prosecuting, told how the defendant had appeared at the school that morning saying if the children '˜didn't show respect' he would shoot them.
'He increased his speed and rammed the gates, forcing them open, saying '˜do you want to see some terrorism?',' she said.
'He then sped toward the reception, swerving closer to staff as he did so.'
Quamar then shouted to a teacherÂ '˜you schooled me, now I'm going to school you', added Ms Alam, telling her to get in the car. When she refused, he yelled '˜get her out or I'm going to run some kids over'.
Only when his brother arrived and led him away, before he was arrested by police, did his rampage finally come to an end.
'All the pupils were sent home, and the situation was calmed by the very professional reactions of staff who had been on site,' continued Ms Alam.
'Quamar was arrested at his home address and no bomb or anything else linking him to terrorismÂ was found. The crown takes the view this was terrorising but not terrorism.'
The court heard how Quamar had been previously been sentenced for dangerous driving after smashing into another car on Netherthorpe Road in August 2016, and on Christmas Day last year had been caught in Page Hall driving whilst disqualified.
Chris Morgan, defending, said Quamar had serious mental health problems at the time, which were exacerbated by his cocaine use, and had no memory of his actions that morning.
He told how the defendant had been diagnosed as having features of bi-polar and deep depression with manic episodes but was now taking medication and had started looking for work, havingÂ made a '˜big turnaround'.
Sentencing Quamar, Recorder Peter Pimm said: 'What you did that day you know was disgraceful and dangerous.'
No one was hurt in the incident but Â£7,000 worth of damage was caused to the school.