The electrical-field gradient (EFG), measured, e.g., in perturbed angular correlation experiments, gives particularly useful information about the interaction of probe atoms like 111 In/ 111 Cd with other defects. The interpretation of the EFG is, however, a difficult task. This paper aims at understanding the interaction of Cd impurities with vacancies and interstitials in Si and Ge, which represents a controversial issue. We apply two complementary ab initio methods in the framework of density-functional theory, (i) the all electron Korringa-Kohn-Rostoker Green function method and (ii) the pseudopotential-plane-wave method, to search for the correct local geometry. Surprisingly we find that both in Si and Ge the substitutional Cd-vacancy complex is unstable and relaxes to a split-vacancy complex with the Cd on the bond-center site. This complex has a very small EFG, allowing a unique assignment of the small measured EFGs of 54 MHz in Ge and 28 MHz in Si. Also, for the Cd-self-interstitial complex we obtain a highly symmetrical split configuration with large EFG's, being in reasonable agreement with experiments.