mainspring (n.)
1590s, of watches, clocks, etc., from main (adj.) + spring (n.3). Figurative use from 1690s.