- Gamma-ray bursts (GRBs), which are bright flashes of gamma rays from extragalactic sources followed by fading afterglow emission, are associated with stellar core collapse events. We report the detection of very-high-energy (VHE) gamma rays from the afterglow of GRB 190829A, between 4 and 56 hours after the trigger, using the High Energy Stereoscopic System (H.E.S.S.). The low luminosity and redshift of GRB 190829A reduce both internal and external absorption, allowing determination of its intrinsic energy spectrum. Between energies of 0.18 and 3.3 tera-electron volts, this spectrum is described by a power law with photon index of 2.07 ± 0.09, similar to the x-ray spectrum. The x-ray and VHE gamma-ray light curves also show similar decay profiles. These similar characteristics in the x-ray and gamma-ray bands challenge GRB afterglow emission scenarios.Copyright © 2021 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works.