medieval walling upon them). During Visigothic times, the city had served as a bishopric, and incorporating the city into Asturias brought legitimacy to the Asturian monarchs who sought to lead a unified Iberian church, during a time when most of the Iberian Peninsula was governed by Muslim powers. History León was created as a separate kingdom when the Asturian king, Alfonso the Great, divided his realm among his three sons. León was inherited by García I (910–914) who moved the capital of the kingdom of Astures to León. His successor was Ordoño II of León (914–924). Ordoño II was also a military leader who brought expeditions from León south to Seville, Córdoba, and Guadalajara, in the heart of the Muslim territory. After a few years of civil wars during the reigns of Fruela II, Alfonso Fróilaz and Alfonso IV, Ramiro II (931–951) assumed the throne and brought stability to the kingdom. A brave military commander who defeated the Muslim armies in their own territory, Ramiro's expeditions turned the valley of the Douro into a no-man's land that separated Christian kingdoms in the north of Iberia from the Muslim states in the south. Ramiro II was nicknamed "The Devil" by Muslims because of his great military skill. As the Leonese troops advanced they were followed by a process of repoblación, which consisted of repopulating the Meseta high plains, with people coming from Galicia and especially from Asturias and León. This migration of Asturian and Leonese peoples greatly influenced the Leonese language. During the repoblación period, there arose a distinct form of art known as Mozarabic art. Mozarabic art is a mixing of Visigoth, Islamic, and Byzantine elements. Notable examples of the Mozarabic style are the Leonese churches of San Miguel de Escalada and Santiago de Peñalba. During the early 10th century, León expanded to the south and east, securing territory that became the County of Burgos. Fortified with numerous castles, Burgos remained within Leon until the 930s, at which time Count Ferdinand II of Castile began a campaign to expand Burgos and make it independent and hereditary. He took for himself the title Count of Castile, in reference to the many castles of the territory (around Burgos), and continued expanding his area at the expense of León by allying with the Caliphate of Córdoba, until 966, when he was defeated by Sancho I of León. Viking raids Sancho I died towards