A magnetar is a type of neutron star with an extremely powerful magnetic field. The magnetic-field decay powers the emission of high-energy electromagnetic radiation, particularly X-rays and gamma rays.