Students in a Bronx middle school were injured on Tuesday after a can of pepper spray went off in the school's cafeteria, police said.

Officers responded to a 911 call around 2 p.m. of an assault at J.H.S 123 in the Soundview neighborhood of the Bronx.

According to police, a 12-year-old girl took out a can of pepper spray in the school's cafeteria, but they could not confirm if the spray was intentionally fired or if it went off by accident.

Six students were taken to NYC Health + Hospitals Jacobi, and one student was taken to NYC Health + Hospitals Lincoln and treated for non-life-threatening injuries.

Five other students who were near the can of pepper spray when it went off suffered mild injuries but refused medical care.

The 12-year-old was taken into custody and was released the same day to her family with no charges, police said.