  We consider the system of massive electrons, possessing nonzero anomalous
magnetic moments, which electroweakly interact with background neutrons under
the influence of an external magnetic field. The Dirac equation for such
electrons is exactly solved. Basing on the obtained solution, we find that a
nonzero electric current of these electrons can flow along the magnetic field.
Accounting for the new current in the Maxwell equations, we demonstrate that a
magnetic field in this system appears to be unstable. Then we consider a
particular case of a degenerate electron gas, which may well exist in a neutron
star, and show that a seed magnetic field can be amplified by more than one
order of magnitude. Finally we discuss the application of our results for the
explanation of the electromagnetic radiation emitted by magnetars.
