An 11-year-old boy in Florida was arrested after he refused to recite the Pledge of Allegiance in class and allegedly refused to listen to orders from school officials and a resource officer.

According to Bay News 9, the boy got into an argument with his substitute teacher earlier this month at Lawton Chiles Middle Academy in Lakeland, Florida, after he refused to stand with his classmates for the pledge.

After the boy told his substitute teacher that the American flag is racist, she asked him, according to her report to the school, “Why if it was so bad here, he did not go to another place to live.” The boy reportedly responded, “They brought me here.” The teacher then said, “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 said she then called the office because she “did not want to continue dealing with him.”

The school resource officer eventually arrested the boy. The arrest affidavit claims the boy was disruptive, didn’t follow commands, called school staff racist, and threatened to get the school resource officer and principal fired and to beat the teacher, according to Bay News 9. The boy told the news station that he did not threaten the teacher with violence.

The student was taken to a juvenile detention center and charged with disrupting a school function and resisting arrest without violence. He was also suspended for three days.

A school spokesperson told Yahoo Lifestyle that students aren’t required to recite the Pledge of Allegiance in class, but the substitute teacher “was not aware of this” and that the teacher “will no longer be allowed to substitute at any of our schools.”

Dhakira Talbot, the boy’s mother, said she was disappointed with how the situation was handled — and that her son should not have been arrested.

“My son has never been through anything like this,” she said. “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.”

To Talbot’s point, the situation is emblematic of what criminal justice reform advocates have called the “school-to-prison pipeline.” Discipline that in the past would have likely involved just a school, the student, and the student’s parents increasingly also involves law enforcement — leading to consequences not just within the school but with the criminal justice system as well. This can lead to lasting damage, not just through a juvenile or criminal record but by also taking students out of school (which can heighten the risk of criminal activity).

In this case, the student was charged with what amounts to disrupting a class. Maybe the kid was out of line. But should he have been arrested and charged for being disruptive, or would school discipline — maybe even just detention or a reprimand — have been enough (if discipline was really necessary)?

For critics of the school-to-prison pipeline, it’s the increasing reliance on the criminal justice system that’s troubling. They claim the growing use of law enforcement in these situations causes far more harm than good.

There’s evidence of a growing, racially disparate school-to-prison pipeline

Over the past few decades, as lawmakers passed “tough on crime” policies, that mentality has trickled down to schools across the nation. As a result, schools began to outsource more and more discipline to law enforcement. School disturbance laws like Florida’s, which more than 20 states have, reflect that: Whereas a teacher would have had to find a way to deal with a disturbance on her own before, she can now call on police or the criminal justice system to do the job.

The result has been a school-to-prison pipeline that acts as many kids’ first exposure to the criminal justice system — and it can lead to more interactions with the justice system later on, because the lost school time and bad marks on kids’ records can make it much more difficult to get ahead.

According to some research, just having a police officer on school grounds can lead to higher exposure to the criminal justice system and punitive policies. A report from the Justice Policy Institute found schools with school resource officers have nearly five times the rate of arrests for disorderly conduct as schools without officers, even though the prevalence of law enforcement in schools has little relationship to reported crime rates.

Exposure to the school-to-prison pipeline is also unequal by race and income. A study published in Sociology of Education of more than 60,000 schools found that schools with relatively larger minority and poor populations are more likely to implement criminalized disciplinary policies — such as suspensions, expulsions, police referrals, and arrests — and less likely to treat students by, say, connecting them to psychological or behavioral care.

Federal investigations and reports have similarly found that black students are punished more harshly than white students in schools, even when black and white students engage in identical or similar behavior.

The result is a pipeline that not only shuffles more students from school to prison but affects black students in particular.

Watch: the school-to-prison-pipeline, explained