Iran is one of the two major centres of Pistacia diversity and the main producer of pistachios in the world. About 282 Iranian pistachio genotypes (Pistacia spp.), together with 22 foreign cultivars (P. vera), were genotyped using 10 simple sequence repeat (SSR) markers to analyse the genetic diversity and relationships among Pistacia species and cultivars. The results revealed that the genetic diversity within P. atlantica subsp. kurdica was considerably lower than in P. vera or P. khinjuk. Principal coordinate analysis revealed a clear separation between the different Pistacia spices, as well as between the Iranian and foreign cultivars. AMOVA analysis showed that the variation between the species, between different populations, and within populations accounted for 41, 9, and 50% of the total variation, respectively. The results demonstrated that the study of genetic diversity and relationships among Pistacia species and cultivars using SSR markers provides important information for the collection and conservation of pistachio germplasm. In addition, the Iranian cultivars had a broader genetic background than that of the foreign cultivars. Thus, they are very important for genetic conservation and the planning of future breeding programmes. We also determined the different levels of genetic diversity that exist between and within the species and populations and showed that gene flow occurs between the Iranian cultivars and wild-type P. vera populations. The study provides practical information that policy-makers and scientists can apply to the conservation and sustainable use of all the species studied.