The casting behaviour, microstructure formation and resulting mechanical properties of materials that undergo a peritectic phase transition during solidification are largely determined by the kinetics of this high-temperature phase transformation during the production process. However, current nucleation models do not accurately predict the nucleation behaviour and phase transition kinetics in many polycrystalline materials. Utilizing a newly developed experimental technique, we have performed in situ observations to study the nucleation behaviour of a newly forming intermediate phase by using the peritectic phase transition in Fe–C and Fe–Ni alloys as examples. In our experiments as well as by using thermodynamic and kinetic arguments we demonstrate that nucleation of a new intermediate (peritectic) phase can be constrained in the presence of solute diffusion fields that form during primary solidification due to an increase in the Gibbs free energy barrier for nucleation. We found a strong correlation between the magnitude of these diffusion fields and the resulting nucleation undercooling required for the formation of a new phase. Our study casts new light on, and clarifies for the first time, the much-debated underpinning reason for the occurrence of massive phase transformations occurring during solidification processing at large nucleation undercoolings. These new insights contribute to the improvement of nucleation theory and allow more accurate predictions on nucleation events and, in turn, physical properties of materials that undergo phase transitions in the course of materials production processes.