It has been speculated that during periods of water deficit, roots may shrink and lose contact with the soil, with a consequent reduction in root water uptake. Due to the opaque nature of soil, however, this process has never been observed in situ for living plants. Through x-ray tomography and image analysis, we have demonstrated the formation and dynamics of air gaps around roots. The high spatial resolution required to image the soil–root gaps was achieved by combining tomography of the entire sample (field of view of 16 by 16 cm, pixel side 0.32 mm) with local tomography of the soil region around the roots (field of view of 5 by 5 cm, pixel side 0.09 mm). For a sandy soil, we found that when the soil dries to a water content of 0.025 m3 m−3, gaps occur around the taproot and the lateral roots of lupin (Lupinus albus L.). Gaps were larger for the taproot than the laterals and were caused primarily by root shrinkage rather than by soil shrinkage. When the soil was irrigated again, the roots swelled, partially refilling the gaps; however, large gaps persisted in the more proximal, older part of the taproot. Gaps are expected to reduce water transfers between soil and roots. Opening and closing of gaps may help plants to prevent water loss when the soil dries, and to restore the soil–root continuity when water becomes available. The persistence of gaps in the more proximal parts is one reason why roots preferentially take up water from their more distal parts.