History of Sardinia
In the Early Middle Ages, through barbarian movements, the waning of the Byzantine Empire influence in the western Mediterranean and the Saracen raids, the island fell out of the sphere of influence of any higher government. This led to the birth of four kingdoms called "Judicates" (Latin: "Judicati"; Sardinian: "Judicados") in the 8th through 10th centuries. Falling under papal influence, Sardinia became the focus of the rivalry of Genoa and Pisa, the Judicates and the Crown of Aragon, which eventually subsumed the island as the Kingdom of Sardinia in 1324. The Kingdom was to last until 1718, when it was ceded to the Piedmontese House of Savoy; later, in 1861, it would thus become the Kingdom of Italy and finally in 1946 the Italian Republic.
History of Cagliari
After the failed attempt at conquest of Sardinia by the Spanish Muslim Mujāhid al-ʿĀmirī in about 1016, the kingdom was divided into four "giudicati", one of which was named Callaris, in reference to its capital, now modern Cagliari. The Judicatus of Cagliari comprised a large area of the Campidano plain, the mineral resources of the Sulcis region, and the mountain region of Ogliastra. There were three other independent and autonomous "giudicati" in Sardinia: the Logudoro (or Torres) in the northwest, the Gallura in the northeast, and in the east the most famous, the long-lived Giudicato of Arborea, with Oristano as its capital.