Flavius Gregorius was Exarch of Africa from 641-651, and afterwards Western Roman Emperor until his death in 674. A distant relative of the Heraclian dynasty, his religious fervour caused him to join the revolt of Isaac I against eastern rule, and he was rewarded with the exarchate after the death of its previous ruler. As the most senior Roman official in the African provinces, he possessed great power second only to the emperor himself, and his fleet proved instrumental in repelling an attempt by Constans II to retake the West.
In 651 Isaac I finally reached an accommodation with the East, agreeing to recognise Islam in return for independence. Naturally Pope Martin I was most displeased by this, as was Gregorius once the news arrived in Carthage. The two conspired to overthrow Isaac and restore Catholic Christianity as the state religion of the West. Gregorius began his uprising and captured Ravenna before the end of the year, being recognised as Emperor by the Senate in Rome, and Isaac was murdered by thieves as he tried to escape Italy in disguise.
As Emperor, Gregorius aggressively campaigned against the Eastern Empire, invading the Balkans on several occasions, as well as against his barbarian neighbours to the north and west. In 673 he attacked and defeated the Burgundians, forcing the Burgundian king and his remaining warriors to sek refuge with their allies in Visigothic Spain. The Spanish king, Wamba, joined his army to that of the Burgundians and marched north to confront the Romans.
On the 2nd August, 673, Gregorius was decisively beaten at the Battle of Aquae Sextiae and forced to retreat into the fortified city of Arelate. There he died in November from the plague, while the city was under siege, after which his army surrendered.
Gregorius' death prompted a series of power struggles between rival contenders for the imperial dignity. The crisis was ended the following June, when the Senate offered it to Wamba, thus beginning the Wambid period of western history.