Leishmania infantum is endemic in Morocco, and it causes both visceral (VL) and cutaneous leishmaniasis (CL). In this study, the multilocus sequence typing (MLST) approach was used to investigate the phylogeny and population structure of Leishmania infantum strains isolated from CL and VL patients and the canine reservoir in different leishmaniasis endemic foci in Morocco. For this purpose, eight loci (pgm, alat, me, fh, g6pd, pgd, gpi and cytb) were amplified in 40 samples, out of which 31 were successfully sequenced. The genetic diversity analysis detected a high degree of intraspecific genetic variability among the studied strains. The phylogenetic and the haplotype analyses showed that most of the strains from the same geographical areas clustered together. The recombination among Leishmania infantum strains was revealed through a splits tree analysis and the number of recombination events. Moreover, the assessment of the gene flow between Leishmania infantum and Leishmania tropica through phylogenetic analysis and haplotype diversity in two endemic foci where the two species were sympatric showed no genetic exchange between the two species.