An electron accelerator including a resonant cavity, an electron source, an RF system, and at least one magnet unit is provided. The resonant cavity further includes a hollow closed conductor and the electron source is configured to radially inject a beam of electrons into the cavity. The RF system is configured to generate an electric field to accelerate the electrons along radial trajectories. The at least one magnet unit further-includes a deflecting magnet configured to generate a magnetic field that deflects an electron beam emerging out of the resonant cavity along a first radial trajectory and redirects the electron beam into the resonant cavity along a second radial trajectory. The resonant cavity further includes a first half shell, a second half shell, and a central ring element.