At the origin of gamma-ray bursts