Camerino was part of the Exarchate of Ravenna until 592, when it was captured by the Lombards. The city under the latter was the seat of a marquisate and then of a duchy which was sometimes under the suzerainty of Spoleto, and which was later conquered by the Franks. In the 10th to 11th centuries the city was under the Mainardi family. Boniface III of Tuscany occupied the duchy around 1050, and then ceded it to his daughter Matilda, who in turn donated it to the Papal States.