Abstract
Anomalous X-ray pulsars1 (AXPs) differ from ordinary radio pulsars in that their X-ray luminosity is orders of magnitude greater than their rate of rotational energy loss, and so they require an additional energy source. One possibility is that AXPs are highly magnetized neuron stars2—or ‘magnetars’—having surface magnetic fields greater than 1014 G. This would make them similar to the soft γ-ray repeaters (SGRs)3, but alternative models that do not require extreme magnetic fields also exist. An optical counterpart to the AXP 4U0142+61 was recently discovered4, consistent with emission from a magnetar, but also from a magnetized hot white dwarf5, or an accreting isolated6 neutron star7. Here we report the detection of optical pulsations from 4U0142+61. The pulsed fraction of optical light (27 per cent) is five to ten times greater than that of soft X-rays, from which we conclude that 4U0142+61 is a magnetar. Although this establishes a direct relationship between AXPs and the soft γ-ray repeaters, the evolutionary connection between AXPs, SGRs and radio pulsars remains controversial.