An 11-year-old Florida student was arrested for allegedly threatening to beat his teacher because he refused to recite the Pledge of Allegiance, calling the pledge “racist” to black people.

The boy was removed from a classroom at Lawton Chiles Middle Academy in Lakeland, Florida, and arrested by a school resource officer on February 4 after he allegedly refused to obey school officials’ orders, Bay News 9 reported Friday.

The officer then took the sixth-grader to a juvenile detention center, where officials charged him two misdemeanor offenses— disrupting a school function and resisting arrest without violence. School officials also suspended him for three days.

The alleged incident began when a substitute teacher asked the student to stand for the pledge.

The student, who usually does not stand for the pledge, replied that he would not participate in the Pledge of Allegiance because he believed the American flag is racist and the national anthem is offensive towards black people.

The substitute teacher pushed back, telling district officials she told the student, “Why if it was so bad here, he did not go to another place to live.”

“They brought me here,” the boy reportedly replied.

“Well you can always go back, because I came here from Cuba and the day I feel I’m not welcome here anymore I would find another place to live,” the teacher then reportedly answered, before calling in other school officials to deal with the student.

Things escalated when the boy allegedly refused to follow school officials’ orders, called them racists, threatened to beat the teacher and get the school officials fired, according to the arrest affidavit.

The boy later told Bay News 9 that he never made threats against the teacher.

His mother, Dhakira Talbot, said the school should have handled the situation differently and is working with the Poor and Minority Justice Association, a nonprofit organization, to get the charges dropped.

“I’m upset, I’m angry. I’m hurt,” Talbot said. “More so for my son. My son has never been through anything like this. I feel like this should’ve been handled differently. If any disciplinary action should’ve been taken, it should’ve been with the school. He shouldn’t have been arrested.”

According to the school’s student handbook, students can opt out of the pledge with written permission from a parent or guardian. But a spokesperson for the school said the substitute teacher was not aware of the policy.

The district also told the substitute teacher she could no longer work at any schools within the district.