While in prison, Samson worked on a treadmill, a machine used to grind grain. He did this work for a few months until his hair grew long again. Next, he was taken to a temple honoring the Philistine god Dagon to perform for the people worshipping Dagon. While on stage, Samson told a young boy nearby to move him in between two pillars. He pushed the pillars apart with his full strength. This caused the temple's roof to fall down on top of himself and his Philistine audience. Samson died, along with twelve thousand of his enemies, including their highest leaders. He defeated more Philistines with his death than during his life.