The 40Ca(p, dπ+)39K reaction was studied theoretically at a proton energy of 650 MeV within the distorted wave impulse approximation (DWIA) and under the assumption of a quasi-free mechanism of the elementary process pp → dπ+ of pion production. The peripheral nature of the reaction on the nucleus was shown. The influence of the effects of distortions in the initial and final states of the reaction on the differential cross section and other spin-dependent characteristics are discussed.