THE spatial and luminosity distribution of γ-ray bursts as observed by the BATSE instrument on the Compton Gamma Ray Observatory1,2 provides support for the revival of the idea3,4 that the burst sources are at cosmological distances5. I present here a new model for γ-ray bursts at cosmological distances, based on the formation of rapidly rotating neutron stars with surface magnetic fields of the order of 1015. Such objects could form by the gravitational collapse of accreting white dwarfs with anomalously high magnetic fields in binaries, as in magnetic cataclysmic binaries. Once formed, such rapidly rotating and strongly magnetized neutron stars would lose their rotational kinetic energy catastrophically, on a timescale of seconds or less: rotation of the magnetic field creates a strong electric field, and hence an electron–positron plasma, which I show to be optically thick and in quasi-thermodynamic equilibrium. This plasma flows away from the neutron star at relativistic speeds, and X-ray and γ-ray emission at the photosphere of this relativistic wind may then reproduce the observational characteristics of a γ-ray burst.