four main historical maritime republics of Italy (). At that time, the city was a very important commercial centre and controlled a significant Mediterranean merchant fleet and navy. It expanded its powers in 1005 through the sack of in the south of Italy. Pisa was in continuous conflict with some 'Saracens' - a medieval term to refer to Arab Muslims - who had their bases in Corsica, for control of the Mediterranean. In 1017, Sardinian Giudicati were militarily supported by Pisa, in alliance with Genoa, to defeat the Saracen King Mugahid, who had settled a logistic base in the north of Sardinia the year before. This victory gave Pisa supremacy in the Tyrrhenian Sea. When the Pisans subsequently ousted the Genoese from Sardinia, a new conflict and rivalry was born between these major marine republics. Between 1030 and 1035, Pisa went on to defeat several rival towns in Sicily and conquer Carthage in North Africa. In 1051–1052, the admiral Jacopo Ciurini conquered Corsica, provoking more resentment from the Genoese. In 1063, Admiral Giovanni Orlandi, coming to the aid of the Norman Roger I, took Palermo from the Saracen pirates. The gold treasure taken from the Saracens in Palermo allowed the Pisans to start the building of their cathedral and the other monuments which constitute the famous . In 1060, Pisa had to engage in their first battle with Genoa. The Pisan victory helped to consolidate its position in the Mediterranean. Pope Gregory VII recognised in 1077 the new "Laws and customs of the sea" instituted by the Pisans, and emperor Henry IV granted them the right to name their own consuls, advised by a council of elders. This was simply a confirmation of the present situation, because in those years, the marquis had already been excluded from power. In 1092, Pope Urban II awarded Pisa the supremacy over Corsica and Sardinia, and at the same time raising the town to the rank of archbishopric. Pisa sacked the Tunisian city of Mahdia in 1088. Four years later, Pisan and Genoese ships helped Alfonso VI of Castilla to push El Cid out of Valencia. A Pisan fleet of 120 ships also took part in the First Crusade, and the Pisans were instrumental in the taking of Jerusalem in 1099. On their way to the Holy Land, the ships did not miss the occasion to sack some Byzantine islands; the Pisan crusaders were