Paynesville High School was evacuated Tuesday morning after 20 students became ill, but it took hours to determine the source of the problem.
The mass sickness followed an incident at a choir concert Monday evening where seven students also fell ill.
Officials say the Monday night illnesses were caused by carbon monoxide and the warm concert lights; however, they say they couldn't explain Tuesday's illnesses beyond possible "hysteria" until CenterPoint Energy located two malfunctioning pieces of equipment emitting carbon monoxide inside the school.
Investigators say they believe the school's boiler exhaust fell back along the roof on Monday night due to the heavy, wet air and got pulled into an intake vent, bringing a burst of exhaust fumes inside the school.
A computer system that monitored the ductwork system showed a spike in carbon monoxide at the time of the incident Monday.
Students again began feeling sick shortly after the day began on Tuesday. School was canceled at 11 a.m., but carbon monoxide detectors did not display any obvious threats.
CenterPoint Energy representatives say crews did everything right by quickly evacuating and ventilating the school; however, that also meant it took longer to find the source of the carbon monoxide leak.
Officials say a cooking appliance and water heater were expelling the colorless, odorless gas, which can prevent proper oxygen absorption in the blood and lead to flu-like symptoms, dizziness and even death.
School officials say the building is considered safe. In a letter to parents and students, Paynesville Superintendent Bob Huot said the district plans to sanitize the building Wednesday and secondary students can stay home. Elementary students also will have the day off due to transportation routes and staffing. School will resume Thursday.
There have been no updates on the condition of the 27 students affected.
Several area fire crews and first response teams were called to the building, which houses both high school and middle school students. In addition, Hazmat and Department of Homeland Security officials were also called in, which officials say is standard practice.