The theory of stimulated Raman adiabatic passage in a three-level Lambda-scheme of the interaction of an atom or molecule with light, which takes the nonadiabatic processes at the beginning and the end of light pulses into account, is developed.