The Visigoths first settled in southern Gaul as foederati of the Romans - a relationship established in 418. However, they soon fell out with their Roman hosts (for reasons that are now obscure) and established their own kingdom with its capital at Toulouse. They next extended their authority into Hispania at the expense of the Suevi and Vandals. In 507, however, their rule in Gaul was ended by the Franks under Clovis I, who defeated them in the Battle of Vouillé. After that, the Visigoth kingdom was limited to Hispania, and they never again held territory north of the Pyrenees other than Septimania. A small, elite group of Visigoths came to dominate the governance of that region at the expense of those who had previously ruled there, particularly in the Byzantine province of Spania and the Suebic Kingdom of Galicia.
During their governance of the Kingdom of Hispania, the Visigoths built several churches that survive. They also left many artifacts, which have been discovered in increasing numbers by archaeologists in recent times. The Treasure of Guarrazar of votive crowns and crosses is the most spectacular. They founded the only new cities in western Europe from the fall of the Western half of the Roman Empire until the rise of the Carolingians. Many Visigothic names and surnames are still in use in modern Spanish and Portuguese. Their most notable legacy, however, was the Visigothic code of law, the Liber iudiciorum, which served, among other things, as the basis for court procedure in most of Christian Iberia until the Late Middle Ages, centuries after the demise of the kingdom.