Through ab initio calculations, researchers discovered the mechanism behind the Verwey transition in magnetite, solving a decades-old problem. The calculations revealed an ordering of t2g orbitals on the iron sublattice in the low-temperature phase. This orbital ordering leads to charge ordering consisting of alternating Fe2+ and Fe3+ ions. Resonant x-ray scattering experiments confirmed these findings. The discovery explains the long-standing mystery of the entropy change at the Verwey transition.