Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A sixth-grader in Florida was arrested after his refusal to participate in the Pledge of Allegiance escalated into a confrontation with police and school officials, authorities said.

The unnamed boy was charged with disrupting a school function and resisting an officer without violence on Feb. 4, the Lakeland Police Department said in a news release.

A local news outlet, Bay News 9, reported that the confrontation began after the student at Lawton Chiles Middle Academy, near Tampa, called the flag racist and described the national anthem as offensive.

Citing a statement provided to the Polk School District by the boy’s substitute teacher, the station reported that the teacher asked him, “why if it was so bad here he did not go to another place to live."

“They brought me here,” the boy replied, according to the statement.

After the teacher told him he could “always go back,” she called the school's office “because I did not want to continue dealing with him,” the station reported.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The district did not respond to a request for comment on Sunday, but a school spokesman told the Ledger, a local newspaper, that students are not required to participate in the pledge.

The spokesman, Kyle Kennedy, told the newspaper that the teacher, Ana Alvarez, wasn’t aware of that policy and would no longer work with the district.

The boy’s mother, Dhakira Talbot, disputed the school's claims, telling NBC News that her son "is not a disrespectful kid."

"What I do know is when she asked my son about it, he responded to her enlightening her on his reasonings," Talbot said. "It wasn’t just that the flag is racist. I don’t teach my children that the flag is racist."

After the confrontation began, the school’s dean of students tried unsuccessfully to calm the student down, asking him to leave the class 20 times, police said.

“The school resource officer then intervened and asked the student to exit the classroom and he refused,” the department said. “The student left the classroom and created another disturbance and made threats while he was escorted to the office.”

The Lakeland Police Department said in a statement that the boy was not arrested for refusing to stand for or recite the Pledge of Allegiance. "This arrest was based on the student’s choice to disrupt the classroom, make threats and resisting the officer’s efforts to leave the classroom."

Talbot denied that her son made any threats and said the school "didn’t handle it the way they should have handled it."

She told NBC News her son was overwhelmed with the situation, and she transferred him to another school.

"I want my son to know, I don’t care what any other parent say or any other parents do, that I’m going to stand up for him," Talbot said.