The history of Santiago de Compostela dates back to prehistory, and the Castro culture, the arrival of the Roman Empire, and, as a turning point, the supposed burial of the Apostle Santiago. The Asturian King Alfonso II ordered the construction of a church and the town was born around it. From that moment on, the city began to grow the center of power of the city represented by the Archbishop of Santiago and the cathedral.
In the territory currently occupied by the Cathedral of Santiago there was a Roman settlement, known as Assegonia, which existed between the second half of the 1st century and the 5th century.
Once the Roman settlement dissapered it became a point of contention between The Asturian kings the secessionist of Galicia. To avoid this, they would assume the genuine representation of the Gothic tradition in matters of religion and law in the territory with which they looked to ensure a single power. Secondly, they name an heir of royal blood, to govern Galicia. But the craftiest maneuver was the creation of Compostela. Taking advantage of the news of the discovery of the body of the Apostle Santiago, the King of Asturias Alfonso II founded at his expense a church that would surround him with privileges. Around the church, he would place communities and founded a town that from its creation enjoyed royal prerogatives. The King of Asturias achieved two major victories with this strategy: they found a patron for their cause, a Santiago knight, Matamoros, and at the same time a city faithful to the limit to the Asturian king nestled in the heart of Galicia.
The birth of Santiago, as it is now known, is linked to the discovery (presumably) of the remains of the Apostle Santiago between 820 and 835. The figure who became the patron saint of Spain in the seventeenth century, opposing others as distinguished as Saint Teresa de Jesús or Saint Millán de la Cogolla, and who continues to attract pilgrims for over two millennia to a western tip of Europe from all over the world.
According to a medieval tradition, as it appears for the first time in the Concordia de Antealtares (1077), the hermit Pelayo, alerted by night lights that occurred in the Libredón forest, notified the bishop of Iria Flavia, Teodomiro, who discovered the remains of Santiago el Mayor and two of his disciples in the place where Compostela would later be founded. Compostela means “field of stars”.
The discovery led Alfonso II, in need of internal cohesion and external support for his kingdom, to make a pilgrimage – announced within his kingdom and abroad – to a new place of pilgrimage in Christianity at a time when the importance of Rome had decayed and Jerusalem was not accessible to the power of the Muslims.
Slowly the city developed. First, a permanent ecclesiastical community was established to care for the remains, formed by the bishop of Iria and the monks of Antealtares. It was established that anyone who remained forty days without being claimed as a servant would be considered a free man with rights to reside in Compostela. The first known inhabitant of Compostela is, in fact, a foreigner: Bretenaldo Franco, whose oldest mention comes from the year 955.
The city grew and Sisenando II fortified it in 969, forming what was known as Locus Sancti Iacobi. This wall created a defensive system around the church that was where the current Cathedral, the Plaza da Quintana and the Convent of San Paio are located.
Given the boom that was taking place, the city was destroyed by the Moorish king Almanzor on August 10, 997, which only respected the apostle’s tomb. When the inhabitants returned, the reconstruction began and, in the middle of the 11th century, Bishop Cresconio provided the city with an enclosure of moats and a new wall, on the old ring of palisades to protect the new neighborhoods that had arisen around the Locus.
In 1075 Bishop Diego Peláez began the construction of the Romanesque cathedral. The increase in pilgrimage meant that Compostela was becoming a place of great religious importance in Europe.
Released from the old tutelage of the archbishops of Braga, who maintained their authority over most of the dioceses of the nascent kingdom of Portugal, the Church of Santiago had jurisdiction over most of those of León and Asturias. Santiago was also the center of a great feudal lordship ruled by the bishops of Compostela, which ran from the Iso River to the Atlantic.
Between the twelfth and thirteenth centuries, a network of streets was articulated within the walled enclosure. The arrival of the Black Death in the city led to a severe demographic recession, which began to recuperate in 1380. In the 15th century, it had between 4,000 and 5,000 inhabitants.