The rapid growth of urban development, industrialization, mining, farming, and biological activities has resulted in potentially toxic metal pollution of the soil all over the world. This has caused degradation of soil quality, lower crop production, and risk to human health. For this work, two study sites were selected to evaluate metal concentrations in the agricultural as well as the recreational soil around the Cerrito Blanco in Matehuala, San Luis Potosi, Mexico. The concentrations of eight metals, namely As, Ca, Mg, Na, K, Sr, Mn, and Fe were analysed in order to determine the level of contamination risk as well as their spatial distributions. However, this study is mainly focused on toxic metals, e.g. As, Sr, Mn, and Fe. The contamination indices techniques were used to evaluate the risk assessment of soil. Additionally, the positive matrix factorization (PMF) model as well as the geostatistical analysis was used to identify the contamination sources based on 64 surface soil samples. After implementing PMF to analyze the soils, it was possible to differentiate the variations in factors linked to the contaminants, farming impacts, and the reference soil geochemistry. The soil in the two studied locations included high concentrations of As, Ca, Mg, K, Sr, Mn, and Fe, including variations in their spatial compositions, which were caused by direct mining activities, the movement and deposition of smelting waste, and the extensive use of irrigated contaminated groundwater for irrigation. The four possible factors were identified for soil pollution including industrial, transportation, agricultural, and naturogenic based on the PMF and geostatistical analysis. The spatial distribution of metal concentrations in the soil was also presented using a geographical information system (GIS) interpolation technique. The identification of metal sources and contamination risk mapping presents a significant role in minimizing pollution sources, and it may be performed in regions with high levels of soil contamination risk.