We prove that Mal’tsev and Goursat categories may be characterized through variations of the Shifting Lemma, that is classically expressed in terms of three congruences R, S and T, and characterizes congruence modular varieties. We first show that a regular category ℂ is a Mal’tsev category if and only if the Shifting Lemma holds for reflexive relations on the same object. Moreover, we prove that a regular category ℂ is a Goursat category if and only if the Shifting Lemma holds for a reflexive relation S and reflexive and positive relations R and T in ℂ. In particular this provides a new characterization of 2-permutable and 3-permutable varieties and quasi-varieties of universal algebras