At one point, Steven De La Torre laughed out loud as prosecutors read the charge against him, detailing the moment he allegedly tried to mow down the guard at The Village School.
He has been charged with aggravated assault.
"The defendant began yelling and screaming, 'Hell no, move out of the way or I will run over your fat ass," prosecutors said in court.
Constable Ted Heap said gunshots were fired outside the school on Gentryside Drive near Whittington on Tuesday after De La Torre was turned away because he was not allowed at the school.
Heap said a security guard noticed the man's car, which was pulling a trailer, approaching the school and recognized him as someone who had a restraining order against him.
The guard used his vehicle to block the man's automobile, according to Heap.
RELATED: Gunshots ring out at Village School after fight breaks out
Heap said the guard exited his vehicle and was approaching the man when De La Torre drove his car towards the guard.
According to prosecutors, the guard took out a 9 mm gun and fired five rounds at De La Torre out of fear for his life and to stop the attack.
The guard suffered some scrapes and scratches but was not seriously injured.
ABC13 was there as De La Torre turned himself in Tuesday night.
No students or faculty were hurt.
On Wednesday, The Village School responded to the incident with a statement.
The full statement reads:
"Yes, there was an incident outside The Village School concerning an individual who is not legally permitted to enter school grounds. There was an altercation between the individual and our security guard which resulted in the security guard discharging his weapon after he had been struck by the individual's vehicle. The individual left the campus area in his vehicle. The security guard was not seriously injured. The authorities were alerted immediately and are still investigating the situation. All of our students and staff were and are safe. We'll provide updates as we go through this investigation."
The judge set De La Torre's bond at $50,000. He's also required to stay more than 1,000 feet away from the school and give up any firearms.
Follow Katherine Marchand on Facebook and Twitter.