A gamma-ray burst (GRB) releases an amount of energy similar to that of a supernova explosion, which combined with its rapid variability suggests an origin related to neutron stars or black holes. Since these compact stellar remnants form from the most massive stars not long after their birth, GRBs should trace the star formation rate in the Universe; we show that the GRB flux distribution is consistent with this. Because of the strong evolution of the star formation rate with redshift, it follows that the dimmest known bursts have zåisebox-0.5ex 6, much above the value usually quoted and beyond the most distant quasars. This explains the absence of bright galaxies in well-studied GRB error boxes. The increased distances imply a peak luminosity of 8.3x105̂1ergs1̂ and a rate density of 0.025 per million years per galaxy. These values are 20 times higher and 150 times lower, respectively, than are implied by fits with non-evolving GRB rates. This means either that GRBs are caused by a much rarer phenomenon than mergers of binary neutron stars, or that their gamma-ray emission is often invisible to us due to beaming. Precise burst locations from optical transients will discriminate between the various models for GRBs from stellar deaths, because the distance between progenitor birth place and burst varies greatly among them. The dimmest GRBs are then the most distant known objects, and may probe the Universe at an age when the first stars were forming.