The Goths spoke a Germanic language. Their own tradition traced their origins to the north. By the third century we find them north of the Black Sea, in contact with the old Greek colonies and the Roman world. The names Ostrogoths and Visigoths came into general use later. These groups took shape as people moved and formed alliances, and the Dniester was never a permanent boundary between them.
In 376, as the Huns advanced, groups of Goths asked Emperor Valens for permission to cross the Danube. Valens agreed, hoping to recruit men for his army. For the families who crossed into what is now northern Bulgaria, the welcome proved bitter. Food was scarce, and Roman officials took advantage of the hungry. Revolt and raids followed. In 378 the Romans suffered a crushing defeat at Adrianople, where the emperor himself was killed. Rivalries among the Goths also complicated dealings with Rome.
In 395 Alaric emerged as a leader. He had fought for Theodosius in the civil war against Eugenius, a campaign in which the Goths had suffered heavy losses. Under Alaric they moved through the Balkans as far south as the Peloponnese. In 401 Alaric invaded Italy. After years of fighting and fruitless negotiations, he entered Rome and sacked it in 410. He died that same year. His successors turned towards Gaul and the Iberian Peninsula. Athaulf was in Barcelona in 415. In 418, under an agreement with the Romans, the Goths settled in Aquitaine and built a kingdom centred on Toulouse.
In 451 the Visigoths fought alongside the Romans against Attila. Under Euric (466–484) they ruled much of southern Gaul and held lands beyond the Pyrenees. In 507 the Franks defeated them at Vouillé, and they lost Toulouse. They nevertheless kept Septimania, a strip of Mediterranean Gaul. The centre of the kingdom shifted to Iberia, where Mérida was an important city and Toledo became the royal seat. In 711 an army of the Umayyad caliphate, largely made up of Berbers from North Africa, crossed the Strait of Gibraltar and defeated King Roderic. Within a few years the conquerors held most of the kingdom.