Abstract. Alfvén oscillations in three-dimensional toroidal magnetic configurations (stellarators) are considered. It is shown that the wave functions of the Alfvén continuum can be trapped in certain "waveguides" when there are sufficiently large harmonics with sufficiently close periods along the magnetic field lines in the Fourier spectrum of the magnetic configuration. Such trapping is typical in the frequency range of the helicity-induced continuum gaps, in which case the wave functions are typically trapped at the inner circumference of the magnetic flux surface. Trapping also takes place near the crossings of continuum gaps, the localization of the wave becoming stronger with approach to the crossing point. At the crossing point, the continuum wave functions are localized at single field lines, which is shown to result in "annihilation" of the gaps (the width of the joint gap is the difference of the widths that the two gaps would have is they were alone). It is shown with the use of the ballooning formalism that the Alfvén eigenmodes (AEs) associated with the trapped continua are also trapped in regions of the same shape. Experimental observations on the stellarator Wendelstein 7-AS are reported, which indicate that trapping of AEs at the inner circumference of the plasma indeed takes place.