  The stellar origin of gamma-ray bursts can be explained by the rapid release
of energy in a highly collimated, extremely relativistic jet. This in turn
appears to require a rapidly spinning highly magnetised stellar core that
collapses into a magnetic neutron star or a black hole within a relatively
massive envelope. They appear to be associated with type Ib/c supernovae but,
with a birthrate of around 10^{-6}-10^{-5} per year per galaxy, they are
considerably rarer than such supernovae in general. To satisfy all these
requirements we hypothesize a binary star model that ends with the merging of
an oxygen neon white dwarf with the carbon-oxygen core of a naked helium star
during a common envelope phase of evolution. The rapid spin and high magnetic
field are natural consequences of such a merging. The evolution that leads to
these progenitors is convoluted and so naturally occurs only very rarely. To
test the hypothesis we evolve a population of progenitors and find that the
rate is as required. At low metallicity we calculate that a similar fraction of
stars evolve to this point and so would expect the gamma-ray burst rate to
correlate with the star formation rate in any galaxy. This too is consistent
with observations. These progenitors, being of intermediate mass, differ
radically from the usually postulated high-mass stars. Thus we can reconcile
observations that the bursts occur close to but not within massive star
associations.
