The Visigoths as a nation were formed under the rule of Alaric I, the first named Balt, only in 395. He famously sacked Rome in 410. His descendants continued to rule down to 531, when on the death of Amalaric the line went extinct. In 507, the Visigoths were defeated by the Franks at the Battle of Vouillé and lost most of their kingdom. In 511, the Ostrogothic king Theoderic the Great intervened to depose the Balt king Gesalec. He ruled himself until his death in 526, when Amalaric succeeded him. Theoderic's intervention is often credited with saving the Visigothic kingdom, but it ended the Balt dynasty.