  We calculate the linear torque exerted by a planet on a circular orbit on a
disc containing a toroidal magnetic field. All fluid perturbations are singular
at the so--called magnetic resonances, where the Doppler shifted frequency of
the perturbation matches that of a slow MHD wave propagating along the field
line. These lie on both sides of the corotation radius. Waves propagate outside
the Lindblad resonances, and also in a restricted region around the magnetic
resonances. The magnetic resonances contribute to a significant global torque
which, like the Lindblad torque, is negative (positive) inside (outside) the
planet's orbit. Since these resonances are closer to the planet than the
Lindblad resonances, the torque they contribute dominates over the Lindblad
torque if the magnetic field is large enough. In addition, if beta=c^2/v_A^2
increases fast enough with radius, the outer magnetic resonance becomes less
important and the total torque is then negative, dominated by the inner
magnetic resonance. This leads to outward migration of the planet. Even for
beta=100 at corotation, a negative torque may be obtained. A planet migrating
inward through a nonmagnetized region of a disc would then stall when reaching
a magnetized region. It would then be able to grow to become a terrestrial
planet or the core of a giant planet. In a turbulent magnetized disc in which
the large scale field structure changes sufficiently slowly, a planet may
alternate between inward and outward migration, depending on the gradients of
the field encountered. Its migration could then become diffusive, or be limited
only to small scales.
