information:classification, stylistic:tone, stylistic:style_transfer
The Visigothic Kingdom, Visigothic Spain or Kingdom of the Goths (Latin: Regnum Gothorum) occupied what is now southwestern France and the Iberian Peninsula from the 5th to the 8th centuries. 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 Gallia Aquitania in southwest Gaul by the Roman government and then extended by conquest over all of Hispania. The Kingdom maintained independence from the Eastern Roman or Byzantine Empire, whose attempts to re-establish Roman authority in Hispania were only partially successful and short-lived.

The Visigoths were romanized central Europeans who had moved west from the Danube Valley. They became foederati of Rome, and wanted to restore the Roman order against the hordes of Vandals, Alans and Suebi. The Western Roman Empire fell in 476 AD; therefore, the Visigoths believed they had the right to take the territories that Rome had promised in Hispania in exchange for restoring the Roman order. Under King Euric —who eliminated the status of foederati—a triumphal advance of the Visigoths began. Alarmed at Visigoth expansion from Aquitania after victory over the Gallo-Roman and Breton armies at Déols in 469, Western Emperor Anthemius sent a fresh army across the Alps against Euric, who was besieging Arles. The Roman army was crushed in the Battle of Arles nearby and Euric then captured Arles and secured much of southern Gaul.

Sometimes referred to as the Regnum Tolosae or Kingdom of Toulouse after its capital Toulouse in modern historiography, the kingdom lost much of its territory in Gaul to the Franks in the early 6th century, save the narrow coastal strip of Septimania. The kingdom of the 6th and 7th centuries is sometimes called the Regnum Toletanum or Kingdom of Toledo after the new capital of Toledo in Hispania. A civil war starting in 549 resulted in an invitation from the Visigoth Athanagild, who had usurped the kingship, to the Byzantine emperor Justinian I to send soldiers to his assistance. Athanagild won his war, but the Byzantines took over Cartagena and a good deal of southern Hispania, until 624 when Swinthila expelled the last Byzantine garrisons from the peninsula, occupying Orcelis, which the Visigoths called Aurariola (today Orihuela in the Province of Alicante). Starting in the 570s Athanagild's brother Liuvigild compensated for this loss by conquering the Kingdom of the Suebi in Gallaecia (corresponding roughly to present-day Galicia and the northern part of Portugal) and annexing it, and by repeated campaigns against the Basques.

The ethnic distinction between the 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 renounced Arianism in 589). This newfound unity found expression in increasingly severe persecution of outsiders, especially the Jews. The Visigothic Code, completed in 654, abolished the old tradition of having different laws for Hispano-Romans and for Visigoths. The 7th century saw many civil wars between factions of the aristocracy. Despite good records left by contemporary bishops, such as Isidore and Leander of Seville, it becomes increasingly difficult to distinguish Goths from Hispano-Romans, as the two became inextricably intertwined. Despite these civil wars, by 625 AD the Visigoths had succeeded in expelling the Byzantines from Hispania and had established a foothold at the port of Ceuta in Africa. Most of the Visigothic Kingdom was conquered by Umayyad troops from North Africa in 711 to 719, with only the northern reaches of Hispania remaining in Christian hands. The medieval Kingdom of Asturias in northern Spain reputedly began when a Visigothic nobleman called Pelagius was elected princeps and became the leader of the Astures and of the Visigoths who had taken refuge in mountains.

The Visigoths and their early kings were Arians and came into conflict with the Church in Rome, but after they converted to Nicene Christianity, the Church exerted an enormous influence on secular affairs through the Councils of Toledo. The Visigoths also developed the highly influential legal code known in Western Europe as the Visigothic Code (Latin: Liber Iudiciorum), which would become the basis for Spanish law throughout the Middle Ages.