From time to time the Earth's magnetic field reverses in polarity, and the record of such reversals is preserved in rocks magnetized at the time of their formation. The cause of reversals has usually been sought in the behaviour of the Earth's core, where the geomagnetic field is generated. But new simulations, which provide a good fit with part of the rock record, implicate mantle events in reversals.