STRONGLY magnetized neutron stars are believed to be at the heart of a number of astrophysical systems, notably pulsars and X-ray binaries. Although the magnetic field is an important determinant in the behaviour of such systems, the origin and stability of the field is the subject of conflicting observational and theoretical evidence. Here I describe a new model of neutron-star magnetic moments, by which the fields are generated as the neutron star is born, and follow the evolution of the field over a Hubble time. With realistic thermal evolution and conductivities, isolated neutron stars will maintain large magnetic fields for more than 1010 years. In addition, I show how mass accretion on to neutron stars can reduce the field strength1,2. This model of field generation and decay can explain a wide variety of observed systems. © 1990 Nature Publishing Group.