The Visigothic Kingdom was a kingdom that occupied what is now southwestern France and the Iberian Peninsula from the fifth to the eighth centuries AD. One of the Germanic successor states to the Western Roman Empire, it was originally created by the settlement of the Visigoths under King Wallia in the province of Aquitaine in southwest France by the Roman government and then extended by conquest over all of the Iberian Peninsula. The Kingdom maintained independence from the Eastern Roman or Byzantine Empire, the attempts of which to re-establish Roman authority in Iberia were only partially successful and short-lived. By the early sixth century, the Kingdom's territory in Gaul had been lost to the Franks, save the narrow coastal strip of Septimania, but the Visigoth control of Iberia was secured by the end of that century with the submission of the Suebi and the Basques. The ethnic distinction between the indigenous Hispano-Roman population and the Visigoths had largely disappeared by this time (the Gothic language lost its last and probably already declining function as a church language when the Visigoths converted to Catholicism in 589). Liber Iudiciorum (completed in 654) abolished the old tradition of having different laws for Romans and for Visigoths. Most of the Visigothic Kingdom was conquered by Arab Umayyad troops from North Africa in 711 AD, with only the northern reaches of Spain remaining in Christian hands. These gave birth to the medieval Kingdom of Asturias when a local landlord called Pelayo, most likely of Gothic origin, was elected Princeps by the Astures.
Pelagius (Spanish: Pelayo; c. 685 – 737) was a Visigothic nobleman who founded the Kingdom of Asturias, ruling it from 718 until his death. Through his victory at the Battle of Covadonga, he is credited with beginning the Reconquista, the Christian reconquest of the Iberian peninsula from the Moors. He established an independent Christian state in opposition to Moorish hegemony, but there is no strong evidence that he intended to resuscitate the old Visigothic Kingdom, or was motivated by any religious desire.
The chief sources for Pelagius's life and career are two Latin chronicles written in the late ninth century in the kingdom he founded. The first is the Chronica Albeldensia, written at Albelda towards 881, and preserved in the Codex Vigilanus, with a continuation to 976. The later is the Chronicle of Alfonso III, which was revised in the early tenth century and preserved in two textual traditions that diverge in several key passages: the Chronica Rotensis, preserved in the Roda Codex, and the Chronica ad Sebastianum, supposedly written by Sebastian, Bishop of Salamanca (910–913). The only likely earlier sources from which these chroniclers could derive information are regnal lists.