noblemen and crowned and anointed by the local bishop at the cathedral, among them Ordoño IV in 958, Bermudo II in 982, and Alfonso VII in 1111, by which time Compostela had become capital of the Kingdom of Galicia. Later, 12th-century kings were also sepulchered in the cathedral, namely Fernando II and Alfonso IX, last of the Kings of León and Galicia before both kingdoms were united with the Kingdom of Castile. During this same 10th century and in the first years of the 11th century Viking raiders tried to assault the town—Galicia is known in the Nordic sagas as Jackobsland or Gallizaland—and bishop Sisenand II, who was killed in battle against them in 968, ordered the construction of a walled fortress to protect the sacred place. In 997 Compostela was assaulted and partially destroyed by Ibn Abi Aamir (known as al-Mansur), Andalusian leader accompanied in his raid by Christian lords, who all received a share of the booty. However, the Andalusian commander showed no interest in the alleged relics of St James. In response to these challenges bishop Cresconio, in the mid-11th century, fortified the entire town, building walls and defensive towers. According to some authors, by the middle years of the 11th century the site had already become a pan-European place of peregrination, while others maintain that the devotion to Saint James was before 11-12th centuries an essentially Galician affair, supported by Asturian and Leonese kings to win over faltering Galician loyalties. Santiago would become in the course of the following century a main Catholic shrine second only to Rome and Jerusalem. In the 12th century, under the impulse of bishop Diego Gelmírez, Compostela became an archbishopric, attracting a large and multinational population. Under the rule of this prelate, the townspeople rebelled, headed by the local council, beginning a secular tradition of confrontation by the people of the city—who fought for self-government—against the local bishop, the secular and jurisdictional lord of the city and of its fief, the semi-independent Terra de Santiago ("land of Saint James"). The culminating moment in this confrontation was reached in the 14th century, when the new prelate, the Frenchman Bérenger de Landore, treacherously executed the counselors of the city in his castle of A Rocha Forte ("the strong rock, castle"), after inviting them for talks. Santiago de Compostela was captured and sacked by the French during the Napoleonic Wars; as a result, the