Data accumulated over the past year strongly favour the idea that gamma-ray bursts lie at cosmological distances, although the nature of the power source remains unclear. Here we report radio observations of the supernova SN 1998bw, which exploded at about the same time, and in about the same direction, as the gamma-ray burst GRB980425. At its peak, the supernova was unusually luminous at radio wavelengths. A simple interpretation of the data requires that the source expanded with an apparent velocity of at least twice the speed of light, indicating that the supernova was accompanied by a shock wave moving at relativistic speeds (the ejects of supernovae are typically characterized by non-relativistic velocities). The energy of the shock is at least 1049 erg, with an inferred ejecta mass of 10-5 solar masses, and we suggest that the early phase of this shock wave produced the bursts of gamma-rays. Although in general the properties of supernovae are very different from those of gamma-ray bursts, we argue that this unusual supernova establishes a second class of gamma-ray burst, which is distinctly different from the cosmological kind.