According to texts written by Mozarabs in northern Hispania during the late ninth century, the Visigoths in 718 elected a nobleman named Pelagius (681–737) as their "princeps", or leader. Pelagius, the first monarch of the Asturian Kingdom, was a grandson of a former king of Hispania, Chindasuinth, and son of Favila, who had been a dignitary at the court of the Visigoth King Egica (687–700), established his headquarters at Cangas de Onís, Asturias and incited an uprising against the Umayyad Muslims.