The COMPASS Collaboration experiment recently discovered a new isovector resonancelike signal with axial-vector quantum numbers, the a1(1420), decaying to f0(980)π. With a mass too close to and a width smaller than the axial-vector ground state a1(1260), it was immediately interpreted as a new light exotic meson, similar to the X, Y, Z states in the hidden-charm sector. We show that a resonancelike signal fully matching the experimental data is produced by the decay of the a1(1260) resonance into K∗(→Kπ)K̄ and subsequent rescattering through a triangle singularity into the coupled f0(980)π channel. The amplitude for this process is calculated using a new approach based on dispersion relations. The triangle-singularity model is fitted to the partial-wave data of the COMPASS experiment. Despite having fewer parameters, this fit shows a slightly better quality than the one using a resonance hypothesis and thus eliminates the need for an additional resonance in order to describe the data. We thereby demonstrate for the first time in the light-meson sector that a resonancelike structure in the experimental data can be described by rescattering through a triangle singularity, providing evidence for a genuine three-body effect.