IIRC, Kehoe had been a maintenance man at the school because his farm wasn’t producing and felt he should be a member of the school’s board (with a raise in pay). When he was denied, he hatched a plan six months in the making. When the school experienced furnace problems, he had access to limited areas in the bowels of the school where he could plant the dynamite and connect them to a couple of timers.
Only one of the timers went off, sparing the lives of many of the children. Kehoe intended to show up as one of the rescuers but found, instead, that his school board nemesis and many others were still alive which led to the final confrontation.
but thank goodness no one was shot with evil guns /s