Eric governed the Duchy of Friuli from Cividale, the former Lombard capital and also residence of the Patriarch of Aquileia. Much of Eric's tenure as duke of Friuli was occupied by the task of subduing the nearby Avars. In this he was accompanied by Pepin of Italy and his own father, the margrave of Avaria. In 791, he and Pepin marched a Lombard army into the Drava valley and ravaged Pannonia, while Charlemagne marched along the Danube into Avar territory. Charlemagne left the campaigning to deal with a Saxon revolt in 792, while Pepin and Eric continued to assault the Avars' ring-shaped strongholds. The great Ring of the Avars, their capital fortress, was taken twice, and the booty was sent to Charlemagne in Aachen and redistributed to all his followers and even to foreign rulers, including King Offa of Mercia.