In rare cases, the removal of a single proton (Z) or neutron (N) from an atomic nucleus leads to a dramatic shape change. These instances are crucial for understanding the components of the nuclear interactions that drive deformation. The mercury isotopes (Z = 80) are a striking example1,2: their close neighbours, the lead isotopes (Z = 82), are spherical and steadily shrink with decreasing N. The even-mass (A = N + Z) mercury isotopes follow this trend. The odd-mass mercury isotopes 181,183,185Hg, however, exhibit noticeably larger charge radii. Due to the experimental difficulties of probing extremely neutron-deficient systems, and the computational complexity of modelling such heavy nuclides, the microscopic origin of this unique shape staggering has remained unclear. Here, by applying resonance ionization spectroscopy, mass spectrometry and nuclear spectroscopy as far as 177Hg, we determine 181Hg as the shape-staggering endpoint. By combining our experimental measurements with Monte Carlo shell model calculations, we conclude that this phenomenon results from the interplay between monopole and quadrupole interactions driving a quantum phase transition, for which we identify the participating orbitals. Although shape staggering in the mercury isotopes is a unique and localized feature in the nuclear chart, it nicely illustrates the concurrence of single-particle and collective degrees of freedom at play in atomic nuclei.