SummaryThe present analysis compares the distribution of surnames by means of spatial autocorrelation analysis in the Spain–Portugal border region. The Spanish National Institute of Statistics provides a database of surnames of residents in the western Spanish provinces of Zamora, Salamanca, Cáceres, Badajoz and Huelva. The Spanish and Portuguese patterns of surname distribution were established according to various geographic axes. The results obtained show a low diversity of surnames in this region – especially in the centre – which can be explained by the absence of any major geographic barriers, with the exception of the mountain ranges between hydrographic basins, and by the presence of traditional roads that have existed since Roman times. The latter have resulted in a constant migratory flow over short–median distances, which, as can be deduced from the surnames, fits two north/south territorial axes running parallel to the border between Spain and Portugal. The distribution patterns of Portuguese and Spanish surnames differ with regard to their frequencies in the five provinces studied, which can be attributed to their respective historical, economic and social conditions. It is concluded that the border delimiting these two countries has affected the migratory flow, thereby conditioning the demographic and genetic structure of the western Spanish regions.