Galicia was part of the Kingdom of the Spanish Visigoths from 585 to 711. In the 8th century Galicia became a part of the newly founded Christian kingdoms of the northwest of the peninsula, Asturias and León. Sometimes it got independence under its own kings. 