This site is running
The prerequisite for Nuclear Magnetic Resonance was the measurement of the magnetic moment of certain nuclei.
In the Stern-Gerlach experiment a beam of electrons passes through a region with a magnetic field orthogonal to the beam, which is split in two parts, one part deflected up and one down, due to the magnetic dipole moment associated with the electron spin.
The nuclear spin was used in a series of conceptually similar experiments by I.I. Rabi and coworkers, which culminated in a resonant measurement (I. I. Rabi, J. R. Zacharias, S. Millman, and P. Kusch, Phys. Rev. 53, 318 (1938)) of the nuclear magnetic moment. I.I. Rabi was awarded the Nobel prize in 1944 for this atomic beam experiment.
A beam of LiCl was steered by magnetic elements in a variant of the Stern-Gerlach experiment, where a deflection due to the nuclear magnetic dipole moment in a field region A was compensated by an opposite deflection in a field region B, finally driving the beam to a detector. The application of a radiofrequency at right angle to a strong steady field along the path lead to a partial unbalance of this compensation, but only when the radiofrequency met the resonance condition:
with equal to the magnetogyric ratio of the nucleus.
This is because the resonant radiofrequency determines a precession of the nuclear spin through a finite angle. Consider for simplicity a full spin reversal, by a precession through : it leads to an opposite deflection in B, resulting in a measurable reduction of counts at the detector. Although the technique was not sensitive enough to be used as a probe inside matter (remember that nuclear spin polarization is obtained only for a tiny fraction of the beam), it already included the principle of resonance.