LAKELAND, Fla. (WFLA) – An 11-year-old was arrested for causing a disturbance and resisting arrest after he allegedly refused to stand for the Pledge of Allegiance at a school in Lakeland earlier this month, police said.

The incident occurred on Feb. 4 at Lawton Chiles Middle Academy, 400 N. Florida Ave.

Police said a school resource officer removed the boy from the classroom after he created a disruption.

According to the Washington Post, it all started when a substitute teacher asked the student to stand for the pledge. The 11-year-old reportedly refused, saying that he thought the U.S. flag was racist. Then an argument ensued.

“The School Resource Officer and Dean of Students responded to the classroom and attempted to calm the student down. The student was asked over 20 times to leave the classroom by the Dean of Students,” Lakeland police spokesman Gary B. Gross said in a news release.

Police said the boy left the classroom and continued to make threats and cause a disturbance.

“The student failed to comply with the officer and the school administrator interfering with the educational process,” the release states.

Police insist that students are not required to participate in the Pledge of Allegiance, per the Polk County School Board Code of Conduct for Students.

“To be clear, the student was NOT arrested for refusing to participate in the pledge,” Goss said.

The boy was ultimately charged with disrupting a school function and resisting arrest without violence. He was taken to a juvenile detention center.