Magnetic resonance imaging (MRI) provides fine spatial resolution, spectral sensitivity and a rich variety of contrast mechanisms for diagnostic medical applications1,2. Nuclear imaging using γ-ray cameras offers the benefits of using small quantities of radioactive tracers that seek specific targets of interest within the body3. Here we describe an imaging and spectroscopic modality that combines favourable aspects of both approaches. Spatial information is encoded into the spin orientations of tiny amounts of a polarized radioactive tracer using pulses of both radio-frequency electromagnetic radiation and magnetic-field gradients, as in MRI. However, rather than detecting weak radio-frequency signals, imaging information is obtained through the detection of γ-rays. A single γ-ray detector can be used to acquire an image; no γ-ray camera is needed. We demonstrate the feasibility of our technique by producing images and spectra from a glass cell containing only about 4 × 1013 atoms (about 1 millicurie) of the metastable isomer 131mXe that were polarized using the laser technique of spin-exchange optical pumping4. If the cell had instead been filled with water and imaged using conventional MRI, then it would have contained more than 1024 water molecules. The high sensitivity of our modality expands the breadth of applications of magnetic resonance, and could lead to a new class of radioactive tracers.