In the Byzantine Empire, the Duchy of the Pentapolis was a duchy, a territory ruled by a duke (dux) appointed by and under the Exarch of Ravenna. The Pentapolis consisted of the cities of Ancona, Fano, Pesaro, Rimini and Sinigaglia. It lay along the Adriatic coast between the rivers Marecchia and Misco immediately south of the core territory of the exarchate ruled directly by the exarch, east of the Duchy of Perugia, another Byzantine territory, and north of the Duchy of Spoleto, which was part of the Lombard Kingdom of Italy. The duchy probably extended inland as far as the Apennine Mountains, perhaps beyond, and its southernmost town was Humana (Numera) on the northern bank of the Misco. The capital of the Pentapolis was Rimini and the duke was both the civil and military authority in the duchy.