Cosmic γ-ray bursts have now been firmly established as one of the most powerful phenomena in the Universe, releasing almost the rest-mass energy of a neutron star within the space of a few seconds (ref. 1). The two most popular models to explain γ-ray bursts are the coalescence of two compact objects such as neutron stars or black holes, or the catastrophic collapse of a massive star in a very energetic supernova-like explosion. Here we show that, about three weeks after the γ-ray burst of 26 March 1998, the transient optical source associated with the burst brightened to about 60 times the expected flux, based upon an extrapolation of the initial light curve. Moreover, the spectrum changed dramatically, with the colour becoming extremely red. We argue that the new source is an underlying supernova. If our hypothesis is true then this provides evidence linking cosmologically located γ-ray bursts with deaths of massive stars.