The tradition at Compostela placed the discovery of the relics of the saint in the time of king Alfonso II (791–842) and of bishop Theodemir of Iria. These traditions were the basis for the pilgrimage route that began to be established in the 9th century, and the shrine dedicated to James at Santiago de Compostela, in Galicia in Spain, became the most famous pilgrimage site in the Christian world. St James's Way is a tree of routes that cross Western Europe and arrive at Santiago through Northern Spain. Eventually James became the patron saint of Spain.