ALTHOUGH cosmic rays of energies up to 1020 eV have been detected, their origin remains obscure. Supernova remnants, pulsars and accreting binary systems containing neutron stars have been suggested as sources, but the link between these sites and cosmic rays cannot be directly established because interstellar magnetic fields render the distribution of charged particles spatially homogeneous. The discovery1 of γ-rays of PeV (1015 eV) energy from Cygnus X-3, an X-ray binary, lends credibility to these sites as cosmic-ray sources, because γ-rays of such energy could only be produced by the interaction of very-high-energy particles with ambient matter. Systematic searches at TeV and PeV energies have revealed a few other possible sources, but the mostly sporadic nature of these detections has led to some doubt over their reality. Here we report the simultaneous detection on 23 February 1989, by experiments in the Kolar Gold Fields in southern India and the Baksan Valley of the northern Caucasus mountains in the USSR, of a PeV burst from the Crab Nebula, an object long suspected of being a cosmic-ray source.