In the 5th century, as part of the invasion of the Roman Empire by Germanic tribes, the Visigoths led by Athaulf, installed themselves in the Tarraconensis (Ebro basin, 410) and when in 475 the Visigothic king Euric formed the kingdom of Tolosa (modern Toulouse), he incorporated the territory equivalent to present-day Catalonia. Later, the Visigothic kingdom lost most of its territory north of the Pyrenees and shifted its capital to Toledo. The Visigothic Kingdom in Hispania lasted until the early 8th century. The Visigothic Kingdom respected and adopted the provincial system inherited from the Romans, the Tarraconense was maintained, but after the establishment of the new province of Cantabria its extension was reduced to the Valley of the Ebro and the current Catalonia. Beginning in 654, king Recceswinth ordered the promulgation of the "Liber Iudiciorum" ("Book of the Judges"), which was the first law code that applied equally to the Goths and to the Hispano-Roman population. This compilation will be in vigor in Catalan counties until the compilation of the Usages of Barcelona by count Ramon Berenguer I, largely based on the same "Liber Iudiciorum". Between 672 and 673, the eastern part of the Tarraconenis (modern Catalonia) and the province of Septimania rebelled against king Wamba, appointing dux Flavius Paulus as king in Narbonne. The rebellion was crushed by Wamba.