A student at a Mastic Beach middle school set another student’s hair on fire Friday morning and was arrested, Suffolk police said.

Police said a teacher doused the flames on the 14-year-old girl’s head at William Paca Middle School. The other student, a boy, 13, was arrested and charged as a juvenile, police said.

Other details were not released, but district officials said it happened about 8 a.m., shortly before classes start.

DataLI crime stats

“School officials immediately stepped in, notified the police and an arrest was made,” the district said in a statement posted on its website. “The victim declined medical attention and was released into the custody of parents.”

School officials said they are “working closely” with police.

“Rest assured, the William Floyd School District has zero tolerance for this type of behavior, and we will continue to work closely with the police to prosecute this individual to the fullest extent of the law,” the district said.

advertisement | advertise on newsday

Other details will not be released due to the students’ ages, according to the statement. The school has sixth, seventh and eighth grade students.

The school’s principal, Michele Gode, and district Superintendent Kevin Coster declined to comment Friday night.