The discovery of the unusual supernova SN1998bw, and its possible association with the gamma-ray burst GRB 980425 [1-3], provide new insights into the explosion mechanism of very massive stars and the origin of some classes of gamma-ray bursts. Optical spectra indicate that SN1998bw is a type Ic supernova [3,4], but its peak luminosity is unusually high compared with typical type Ic supernovae . Here we report our findings that the optical spectra and the light curve of SN1998bw can be well reproduced by an extremely energetic explosion of a massive star composed mainly of carbon and oxygen (having lost its hydrogen and helium envelopes). The kinetic energy of the ejecta is as large as (2-5) x 1052 erg, more than ten times that of previously observed supernovae. This type of supernova could therefore be termed 'hypernova'. The extremely large energy suggests the existence of a new mechanism of massive star explosion that can also produce the relativistic shocks necessary to generate the observed gamma-rays.