Africa and Italy were reconquered from 534-554 under the Emperor Justinian, but Italy was devastated in the process. When the Lombards entered the peninsula a few years later the Romans found themselves unable to resist and were forced to retreat to the major cities. As a result of all this, there was much resentment against the government in Constantinople felt by Italians.
In the 630's the Emperor Heraclius converted to Islam and, with the unexpected support of the Arian Lombard bishops, succeeded in forcing the Third Council of Constantinople to reject trinitarianism and recognise Muhammad as Seal of the Prophets. In response, Exarch Isaac of Ravenna, supported by the Pope and by the majority of the Italian people, declared the West to be independent and had himself proclaimed emperor. Unhampered by the previous reluctance of Constantinople to spend money on a ruined frontier province and able to act freely whilst the East was engaged in civil war, Isaac raised an army and began the process of driving the Lombards out of Italy.
By turning the newly-arrived Croats into foederati and settling them in Illyria, and by securing the support of the fleet based in Carthage for his cause, Isaac ensured that the East could not easily retaliate against him. Finally in 655 Isaac felt secure enough to begin peace negotiations and recognised the position of the new faith in the eastern empire.
This was unacceptable to the Pope, who was determined to restore the entire empire to Chalcedonian Christianity. In 656 he urged and assisted the Exarch of Africa, Gregorius, to invade Italy and overthrow Isaac. As the new Emperor in the West, Gregorius prepared for war with the East and in 659 crossed over to Greece with his army.
After winning several victories, he was able to drive the eastern empire out of Europe altogether, but was forced to withdraw from Greece when faced by the invasion of the Bulgars. Instead he planned to reconquer the remainder of the lost territories in the West - namely Hispania, Gaul and Britannia - but upon his death in 674 after conquering Burgundy his empire fell into chaos.
At this point Wamba, King of the Visigoths, was the most powerful ruler in western Europe, and Wamba's retaliatory invasion of Italy the following year led to him unintentionally being proclaimed Emperor. As a moderate candidate willing to tolerate all religious beliefs, Wamba was considered to be the ideal candidate to maintaine peace and order, despite being a barbarian. With his authority recognised by the African exarch, and with the Franks and Britons paying tribute as vassals, the Western Roman Empire had finally been reunited not by a Roman, but by a Goth.
The Empire became divided once more in 721 into Spanish, Burgundian, Italian and African subkindgoms, following the death of Emperor Ardo and the division of his inheritance between his sons. The imperial title and regalia resided in Spain until 799, when Charlemagne the Frank sacked Barcelona and was crowned Holy Roman Emperor by the Pope the following year. From this point on the right to the title of Western Empire is usually considered to be held by the Holy Roman Empire, while the remnants of the Wambid empire eventually developed into the modern-day countries of Spain, Aquitaine, Italy and Africa.