We show that unusual nonlinear self-sustained waves, called nonlinear waveguide modes ͑NWGMs͒, can propagate along thin slabs of layered superconductors. We show that these waves are stable in the main approximation for extremely anisotropic superconductors if the nonlinear wave amplitude is smaller than a critical value. These modes have no analogs among linear Josephson plasma waves and do not exist in thick samples. The magnetic field of the NWGM is distributed symmetrically with respect to the middle of the slab, decays far from the sample, and can change its sign inside. The impedance ratio of the tangential electric-and magnetic-field amplitudes for NWGMs can be of the order of unity, resulting in a nonmonotonic dispersion relation, ͑k͒, strongly sensitive to the NWGM amplitudes. Thus, the "stopping light" phenomenon, now controlled by the magnetic-field amplitude, can be observed. Resonance excitations of the NWGMs should produce anomalies in the amplitude dependence of the reflectivity and transmissivity of the incident terahertz waves, which could be useful for terahertz devices.The Maxwell equations for EMWs in vacuum ͑z Ͼ d /2͒ determine the distributions of the magnetic ͑directed along the y axis͒ and electric fields,also,with the spatial decrement q v = ͱ k 2 − 2 / c 2 . The impedance ratio, PHYSICAL REVIEW B 75, 184503 ͑2007͒