Seven students at a Brampton school were transported to the hospital after an irritating spray was released in the cafeteria, authorities say.

The Castlebrooke Secondary School, located in the Gore and Castlemore roads area, was evacuated around 12:30 p.m.

At least one student fainted as a result of the substance being released, Peel District School Board said.

Police said that seven students were taken to a local hospital as a precaution. In total, police said that 18 students and staff were affected by the substance and experienced an irritation in their eyes, nose and throat.

“We have contacted emergency services and the Peel District School Board's maintenance department who are arriving on-site to investigate the situation,” the school board said in a statement. “As a result, some students may require medical attention. Families of those students will be contacted directly. “

Students were allowed back into the school by 3 p.m.