We have measured spectral diffusion in Er3+-doped YLiF4 from the time dependence of spectral hole shapes. The holes were burned in the absorption corresponding to the transition between the lowest Zeeman components of the 4I15/2(1) and 4F9/2(1) levels of Er3+:YLiF4 at 15 298.6 cm-1 and were scanned by rapid Zeeman tuning of the erbium energy levels. In an external magnetic field of 26 kG, which supresses erbium-erbium spin flips, the mechanism for spectral diffusion involved local field fluctuations that are due to 19F nuclear spin flips in the perturbing field of the erbium electron spins. Numerical simulation of the fluorine spin dynamics gives semiquantitative agreement with the observed time-dependent hole shapes. © 1992 Optical Society of America.