Heavy metal pollution can result in the degradation of the soil, air and water bodies' quality affecting the health of all living organism. We analyze the spatial distribution of the concentrations of soil heavy metal and relationship with natural or anthropogenic origin. The analysis was performed in Principality of Asturias (mountain region of NW of Spain), where soil heavy metal pollution has become a severe problem. First, a standard Principal Components Analysis (PCA) was performed over a population of 334 soil samples to identify the sources of fourteen heavy metal and metalloids (Ag, As, Ba, Hg, Cd, Co, Cr, Cu, Mn, Mo, Ni, Pb, Sb, Zn). Due to the high geological heterogeneity of the territory, the PCA analysis was improved using a variant of PCA known as Geographically Weighted Principal Components Analysis (GWPCA). The first six principal components in a standard PCA account for about 57% of soil heavy metal variability but when GWPCA is performed this figure increases to > 80% in some areas. We conclude that GWPC1 corresponds to a geogenetic component with changing winning variables adapted to the geological characteristics of the territory (lithology and mining), while GWPC2 corresponds to a factor related to atmospheric pollution including heavy metal released from vegetation cover via wildfires.