Follow CBSMIAMI.COM: Facebook | Twitter

MIAMI (CBSMiami) — A South Florida student faced a judge Wednesday, charged with battery on an officer.

READ MORE: U.S. Food Exports To Cuba Have Increased By 144 Percent In Last Year

The student ended up in handcuffs the day before after a  fight broke out in Miami Springs Senior High School.

On Wednesday, an attorney for the student claimed he had mental illness and was off his medication when he allegedly swung at school employees and  a security guard.

The judge ordered the student to be placed on home detention without a GPS monitor.

The day before, Chopper4 was over the scene as the student was being placed in a squad car.

The fight that landed him there was between him and another student but it escalated during lunch time.

READ MORE: It's National Florida Day So Here Are Some Fun Facts About The Sunshine State

“Everyone started running toward the front of the cafeteria because some kid pushed another kid against the wall,” said student Sharon Addin.

Related: Student Charged With Battery On Police Officer During School Fight

Witnesses said when a cafeteria worker, vice principal and security guard tried to intervene, the student swung at them.  

When a police officer arrived, students say the student turned on him, landing the young man in cuffs.  

He is now facing a charge of battery on a law enforcement officer and could be in even more trouble if the lunch lady and other school staff decide to press charges.

MORE NEWS: 'Really A Reckless Decision': Gov. DeSantis On FDA's Decision To Revoke Emergency Use Of Certain Mononclonal Antibody Treatments

The other student involved in the fight will be disciplined administratively, officials said.