Around 805, Krum defeated the Avar Khaganate to destroy the remainder of the Avars and to restore Bulgar authority in Ongal again, the traditional Bulgar name for the area north of the Danube across the Carpathians covering Transylvania and along the Danube into eastern Pannonia. This resulted in the establishment of a common border between the Frankish Empire and Bulgaria, which would have important repercussions for the policy of Krum's successors.