The geographical proximity, especially with Galicia, has created conditions for ages the presence of strong relations between the Spaniards and the city.
The origins of Porto and Galicia are shared since the first century AD, when the area north of the Douro River was inhabited by the Celtic people. When the Iberian Peninsula was conquered by the Arabs, many inhabitants took refuge in Galicia and only after the re-conquest of the peninsula by Christian realms Porto was repopulated. The first bishop of Porto had been canon in Compostela; the first charter of Porto was granted in 1124, even before the establishment of Portugal as a country.
Between the sixteenth and seventeenth centuries, trade with Galicia was intensified. Subsequently, trade would be extended to more distant cities, such as Andalusia, Castile and Barcelona. The emigration between the two countries was motivated by political and economic reasons, which was constant throughout the centuries. The liberal Portuguese revolution in (1820), which had its epicenter in Oporto, was greatly influenced by the Spanish revolution. The first Spanish vice consul arrived in the city in the mid-eighteenth century and in the nineteenth century the Spanish colony in Oporto represented roughly 60% of the total number of foreigners.