DeSmet School in Missoula canceled all classes on Monday due to flooding in the building.
Principal Matthew Driessen reported something went haywire in the fire suppression system and a sprinkler went off.
School officials believe it happened around midnight, when a cold air pocket formed in the ceiling of the pottery classroom.
The pocket froze some piping, triggering a fire suppression sprinkler head to rupture.
The alarm system alerted the Missoula Fire Department and the school superintendent.
A quick response limited the flooding to a few classrooms and with parts of the hallway.
"It's kind of a team effort from a lot of the people who work in the community and within DeSmet to make sure the school us up and ready to go tomorrow morning for the kids," said Principal Driessen.
Driessen said school will be back in session on Tuesday at 8 a.m. with no bus delays.