Rufiji tilapia (Oreochromis urolepis urolepis) is an endemic cichlid in Tanzania. In addition to its importance for biodiversity conservation, Rufiji tilapia is also attractive for farming due to its high growth rate, salinity tolerance, and the production of all‐male hybrids when crossed with Nile tilapia (Oreochromis niloticus). The aim of the current study was to assess the genetic diversity and population structure of both wild and farmed Rufiji tilapia populations in order to inform conservation and aquaculture practices. Double‐digest restriction‐site‐associated DNA (ddRAD) libraries were constructed from 195 animals originating from eight wild (Nyamisati, Utete, Mansi, Mindu, Wami, Ruaha, Kibasira, and Kilola) and two farmed (Bwawani and Chemchem) populations. The identified single nucleotide polymorphisms (SNPs; n = 2,182) were used to investigate the genetic variation within and among the studied populations. Genetic distance estimates (Fst) were low among populations from neighboring locations, with the exception of Utete and Chemchem populations (Fst = 0.34). Isolation‐by‐distance (IBD) analysis among the wild populations did not detect any significant correlation signal (r = .05; p‐value = .4) between the genetic distance and the sampling (Euclidean distance) locations. Population structure and putative ancestry were further investigated using both Bayesian (Structure) and multivariate approaches (discriminant analysis of principal components). Both analysis indicated the existence of three distinct genetic clusters. Two cross‐validation scenarios were conducted in order to test the efficiency of the SNP dataset for discriminating between farmed and wild animals or predicting the population of origin. Approximately 95% of the test dataset was correctly classified in the first scenario, while in the case of predicting for the population of origin 68% of the test dataset was correctly classified. Overall, our results provide novel insights regarding the population structure of Rufiji tilapia and a new database of informative SNP markers for both conservation management and aquaculture activities.