Following the fall of the Western Roman Empire, the region was invaded by the Goths. After the Gothic War, it was part of the Byzantine Exarchate of Ravenna (Ancona, Fano, Pesaro, Rimini, and Senigallia forming the so-called Pentapolis). After the fall of the Exarchate, it was briefly in the possession of the Lombards, but was conquered by Charlemagne in the late eighth century. In the ninth to eleventh centuries, the marches of Camerino, Fermo and Ancona were created, hence the modern name.