 Kingdom of Arborea at the times of its maximum expansion occupied the whole island's territory, except the cities of Alghero and Cagliari.In the early 9th century, when the Arabs and Berbers of North Africa became aggressive in expansion and piracy, the central authorities of the Byzantine Empire were unable to effectively defend or consistently govern the imperial province of Sardinia.The local Byzantine magistrates, entitled "iudici", meaning "judges" were increasingly left to provide for administration and defense by themselves.