When loosely packed water-saturated granular soils, for example sands, are subjected to strong earthquake shaking, they may liquefy, causing large deformations with great destructive power. The phenomenon is quite general and occurs in any fluid-saturated granular material and is a consequence of the transfer of stress from inter-grain contacts to water pressure. In modern geotechnical practice, soil liquefaction is commonly considered to be an ‘undrained’ phenomenon; pressure is thought to be generated because earthquake deformations are too quick to allow fluid flow, which enables water depressurization. Here, we show via a first principles analysis that liquefaction is not a strictly undrained process; and, in fact, it is the interplay between grain rearrangement, fluid migration and changes in permeability, which causes the loss of strength observed in so many destructive earthquake events around the world. The results call into question many of the common laboratory and field methods of evaluating the liquefaction resistance of soil and indicate new directions for the field, laboratory and scale-model study of this important phenomenon.