
The Visigothic Kingdom was a Germanic kingdom which ruled over the Iberian Peninsula and southern France from 418 to 721 AD, with Toulouse serving as its capital from 418 to 507, Barcelona from 507 to 542, and Toledo from 542 to 717. The Visigothic king Ataulf established Visigothic control over Narbonne, Toulouse, and Bourdeaux with the permission of the Western Roman Emperor Honorius, and his successor Wallia was convinced by the Western Romans to drive the Suebi, Vandals, and Alans from Spain a few years later. The Suebi and some Vandals had established themselves in Galicia, the Vandals in Baetica in the southwest, and the Alans in Lusitania south of the Duero, and the Visigothic campaign to reconquer Iberia would not be complete until 585. However, the Romans still recognized the Visigothic kingdom in southern France, and the Visigoths established their capital at Toulouse. Their peace with the Romans lasted until 456, and, in 429, Theodoric I pushed the Vandals from Spain into Africa and also forced the Suebi from Galicia; the Alans were virtually annihilated. Under Theodoric II, from 453 to 466, the Visigoths renounced imperial sovereignty and conquered much of Gaul and Spain, while Euric, who reigned from 467 to 485, secured the entiire Iberian Peninsula with the exception of the northwest and some pockets of Hispano-Roman resistance. In 508, King Clovis I and the Franks drove the Visigoths from all of Gaul apart from Septimania, forcing the Visigoths to make Narbonne their new capital. In the mid-6th century, the Visigothic pretender Athanagild persuaded the Eastern Roman emperor Justinian to provide him with an army to secure the Visigothic throne for himself, and the Byzantines gained a block of territory in southeastern Hispania, stretching from the Guadalquivir in the west to the Jucar in the east. The Visigoths reconquered much of this land after Justinian's death, but Byzantine influence remained strong in southeastern Spain from the 550s to the 620s. Athanagild was able to establish the Visigoths' capital at Toledo, however, and Toledo remained the center of Visigothic power for the rest of the kingdom's history.
The Visigoths accommodated Roman laws into their legal system; in the absence of trained lawyers and judges, the collective memory of Visigothic elders defined the Visigoths' customary law, leading to Euric commissioning the Gallo-Roman jurist Leon of Narbonne to prepare a national law code for the Goths. Elements of Roman law, such as canon legislation, entered the Visigothic code, which was applied only to the Visigoths; the Gallo-Romans and Hispano-Romans were allowed to keep Roman law until a uniform legal code was adopted by King Alric II in 506. Under King Chindaswinth, who reigned from 642 to 653, the new Fuero Juzgo legal code was adopted, and Germanic customary law fell out of use as Roman law took hold. At the same time, Arian and Catholic versions of Christianity remained in conflict, with the Visigothic ruling class adhering to Arianism while their Romanized and Suebic subjects adhered to Catholicism. King Reccared eased the tensions by converting to Catholicism in 586, largely due to the work of Bishop Leander of Seville; in 589, the Third Council of Toledo led to the royal family, the higher Arian clergy, and most of the Visigothic nobility converting to Catholicism, doing what most Visigoths had already done. This conversion marked the beginning of the extinction of the Gothic language in Spain, as Gothic had survived only as the language of the Arian church; Reccared had all Arian books seized and destroyed, and Latin replaced Gothic as the language of legal pronouncements, while Latin completely replaced Gothic as a spoken language.
The kingdom was also destabilized as the result of power struggles between the nobility and the monarchy. The Visigothic kings were traditionally elected by their nobles, but the Visigothic rulers of Spain tried to secure hereditary succession. Civil wars often followed the deaths of kings, with the nobles raising an elected claimant to challenge the hereditary heir to the throne. These feuding sides would occasionally seek outside support, such as when the Byzantines invaded Spain, and, later, the Muslims. Starting in 589, the kings responded by calling national councils to nominate new kings, as well as to petition or initiate new legislation. In the field of education, the Roman municipal schools and the individual masters of rhetoric disappeared, and, while the Jewish communities retained their own academics, the Catholic Church carried out the bulk of education under the Visigoths. Germanic and Roman insittutions were blended, but the continuities from the Roman times were stronger, as only 100,000 Visigoths inhabited a peninsula shared with several million Hispano-Romans.
In 710, the last Visigothic king, Roderic, was elected by a group of nobles in defiance of the late king Witiza, whose son Akhila also claimed the throne. Akhila's supporters, along with the Byzantine exarch Julian of Ceuta, encouraged the Muslims to attack Roderic after Akhila's rebels withdrew to the northeast of the peninsula. Roderic faced opposition both within the ruling class and from his Hispano-Roman subjects, and, in July 710, a reconnaissance force of 400 Muslims crossed into Iberia from North Africa at a place just west of Gibraltar. Encouraged by a lack of resistance, the Muslims organized a large invasion force of between 7,000 and 12,000 Berbers commanded by Tariq ibn Ziyad, the Governor of Tangier. Tariq and his army crossed the strait and established a camp at the base of Mons Calpe, which was renamed Djebel al-Tariq ("Hill of Tariq"), or "Gibraltar". This army met the Visigothic king Roderic in battle at the Battle of Guadalete, during which Roderic was slain and Visigothic resistance to the Islamic invasion collapsed as the lightning Umayyad conquest of Hispania brought about the end of Visigothic Spain and the birth of the rump Kingdom of Asturias.