Sunspots are the longest-known manifestation of solar activity, and their magnetic nature has been known for more than a century. Despite this, the boundary between umbrae and penumbrae, the two fundamental sunspot regions, has hitherto been solely defined by an intensity threshold. Here, we aim at studying the magnetic nature of umbra-penumbra boundaries in sunspots of different sizes, morphologies, evolutionary stages, and phases of the solar cycle. We used a sample of 88 scans of the Hinode/SOT spectropolarimeter to infer the magnetic field properties in at the umbral boundaries. We defined these umbra-penumbra boundaries by an intensity threshold and performed a statistical analysis of the magnetic field properties on these boundaries. We statistically prove that the umbra-penumbra boundary in stable sunspots is characterised by an invariant value of the vertical magnetic field component: the vertical component of the magnetic field strength does not depend on the umbra size, its morphology, and phase of the solar cycle. With the statistical Bayesian inference, we find that the strength of the vertical magnetic field component is, with a likelihood of 99%, in the range of 1849-1885 G with the most probable value of 1867 G. In contrast, the magnetic field strength and inclination averaged along individual boundaries are found to be dependent on the umbral size: the larger the umbra, the stronger and more horizontal the magnetic field at its boundary. The umbra and penumbra of sunspots are separated by a boundary that has hitherto been defined by an intensity threshold. We now unveil the empirical law of the magnetic nature of the umbra-penumbra boundary in stable sunspots: it is an invariant vertical component of the magnetic field.