The attack struck at a place of worship and learning, intensifying national debate over school safety.