The two anomalous X-ray pulsars (AXPs) with well-sampled timing histories, 1E 1048.1-5937 and 1E 2259+586, are known to spin down irregularly, with "bumps" superposed on an overall linear trend. Here we show that if AXPs are nonaccreting magnetars, i.e., isolated neutron stars with surface magnetic fields B-0 greater than or similar to 10(10) T, then they spin down electromagnetically in exactly the manner observed, because of an effect called "radiative precession." Internal hydromagnetic stresses deform the star, creating a fractional difference epsilon = (I-3 - I-1)/I-1 similar to 10(-8) between the principal moments of inertia I-1 and I-3; the resulting Eulerian precession couples to an oscillating component of the electromagnetic torque associated with the near-zone radiation fields, and the star executes an anharmonic wobble with period tau(pr) similar to 2 pi/epsilon Omega(t) similar to 10 yr, where Omega(t) is the rotation frequency as a function of time t. We solve Euler's equations for a biaxial magnet rotating in vacuo, show that the computed Omega(t) matches the measured timing histories of 1E 1048.1-5937 and 1E 2259+586, predict Omega(t) for the next 20 years for both objects, predict a statistical relation between (d Omega/dt) and tau(pr), to be tested as the population of known AXPs grows, and hypothesize that radiative precession will be observed in future X-ray timing of soft gamma-ray repeaters.