The faithful believe that Santiago Apóstol (St James the Apostle, one of Christ's closest disciples) preached in Galicia and, after his execution in Palestine, was brought back by stone boat and buried here. The tomb was supposedly rediscovered circa AD 820 by a religious hermit, Pelayo, following a guiding star (hence, it's thought, the name Compostela – from the Latin campus stellae, field of the star). Asturian king Alfonso II had a church erected above the holy remains, pilgrims began flocking to it, Alfonso III replaced it with a bigger church in the 890s, and by the 11th century the pilgrimage along the Camino de Santiago was a major European phenomenon, bringing a flood of funds into the city. The building of the magnificent cathedral we see today began in 1075, and Bishop Diego Xelmírez obtained archbishopric status for Santiago in 1100 and added numerous other churches in the 12th century. The following centuries, however, were marked by squabbling between rival nobles, and Santiago gradually slipped into the background.

Only since the 1980s, as capital of the autonomous region of Galicia and a rediscovered tourist and pilgrimage destination, has the city been revitalised.