Earth may have had a protective magnetic field earlier than previously thought, generated not by its liquid outer core as happens today, but by a magma ocean sitting above the core, a new study suggests.