Avar Khaganate
Charlemagne, temporarily allied with Khan Krum of Bulgaria, from 791 onwards had launched several military campaigns against the Avars and had established the Avar March ("Avaria") on the southeastern frontier of his realm, ruled by his brother-in-law Prefect Gerold of Bavaria. When the Avar Khaganate finally collapsed in 804, Emperor Charlemagne re-arranged "Avaria" into: