A quantal and a semiclassical analysis of two-nucleon transfer intensities is done within the framework of the interacting boson model. The expected features of these quantities for the quantum phase transition (QPT) between spherical, U(5), and axially deformed, SU(3), shapes are discussed. Experimental data for (p, t) and (t, p) transfer reactions clearly show the occurrence of QPTs in Gd, Sm and Nd.