Nonlinear optical transmission in unintentionally or lightly doped CdS crystals is studied theoretically and experimentally near the band gap. A spatially homogeneous three-level model is developed which explains the observed optical switching process and its dependence upon incident intensity, wavelength, lattice temperature, and surface reflectivity. It is shown that the switching is due to the dynamics of the generation-recombination processes involving donors, acceptors, and the conduction band, and not due to transmissive optical bistability.