In 375, the Visigoths crossed the Danube into the Roman Empire because they were fleeing the Huns, who had seized their territory. They were tolerated for a while, but Eastern Emperor Valens led an army to drive them out three years later. That proved to be a costly mistake. Both the emperor and his army were killed in the Battle of Adrianople. Theodosius I, Valens's successor, signed a peace treaty with the Visigoths in 382, essentially making the Visigoths Roman allies. However, under their new leader, Alaric, the Visigoths rebelled against the Romans under the intention that they could gain concessions from the Romans. With this mentality, the Visigoths invaded the Balkans and in 401, invaded northern Italy. The Western Emperor Honorius abandoned their residence in Milan to seek a new home in Ravenna. Both Honorius and his regent, Stilicho, drove the invaders back soon after.
The military situation in the west took a turn for the worse when the Vandals, Alans and Suebi invaded Roman territory in December 406. The group attacked Trier and Gaul before crossing the Pyrenees into Spain in 409. The Goths made a second attack upon Rome on August 24, 410. Although it was no longer the imperial capital, the event shocked those throughout the civilized world. Alaric died that same year, before the Visigoths sought Gaul and Spain in 412. Italy, however, still remained under Roman possession. The Visigoths established an independent kingdom in Aquitaine in 418 and large parts of Spain were in Suebic, Alan or Vandal control. When the Vandals invaded Africa and captured Carthage, the Western Empire was on the verge of breakdown.