In the MHD approximation, an exact solution is obtained for a model of
a rotating spherical star with a magnetic field. The relationship bet
ween the gravitational field, angular momentum, internal magnetic fiel
d, and dipole moment of an external magnetic field is dependent on the
radial mode of the current distribution, which is described by a sing
le dimensionless parameter. The magnitude of a magnetic field confined
by the star is limited by the requirement of the existence of an equi
librium configuration with a pressure vanishing at the spherical surfa
ce r = R.