were other reasons beside this papal decision: it was the final successful result of the long fight against the Ghibelline (pro-imperial) city of Pisa and the Holy Roman Empire itself. Furthermore, Sardinia was then under the control of the very Catholic kings of Aragon, and the last result of rapprochement of the island to Rome. The Sardinian church had never been under the control of the Ecumenical Patriarchate of Constantinople; it was an autonomous province loyal to Rome and belonging to the Latin Church, but during the Byzantine period became influenced by Byzantine liturgy and culture. Foundation of the Kingdom of Sardinia In 1297, Pope Boniface VIII, intervening between the Houses of Anjou and Aragon, established on paper a Regnum Sardiniae et Corsicae that would be a fief of the papacy. Then, ignoring the indigenous states which already existed, the pope offered his newly invented fief to James II of Aragon, promising him papal support should he wish to conquer Pisan Sardinia in exchange for Sicily. In 1323 James II formed an alliance with Hugh II of Arborea and, following a military campaign which lasted a year or so, occupied the Pisan territories of Cagliari and Gallura along with the city of Sassari, claiming the territory as the Kingdom of Sardinia and Corsica. In 1353, Arborea waged war on Aragon. The Crown of Aragon did not reduce the last of the judicates (indigenous kingdoms of Sardinia) until 1420. The Kingdom of Sardinia and Corsica retained its separate character as part of the Crown of Aragon and was not merely incorporated into the Kingdom of Aragon. At the time of his struggles with Arborea, Peter IV of Aragon granted an autonomous legislature to the kingdom and its legal traditions. The kingdom was governed in the king's name by a viceroy. In 1420, Alfonso V of Aragon, king of Sicily and heir to Aragon, bought the remaining territories for 100,000 gold florins of the Judicate of Arborea in the 1420 from the last judge, William III of Narbonne, and the "Kingdom of Sardinia" extended throughout the island, except for the city of Castelsardo (at that time called Casteldoria or Castelgenovese) that was stolen from the Doria in 1448, and renamed Castillo Aragonés (Aragonese Castle). Corsica, which had never been conquered, was dropped from the formal title and Sardinia passed with the Crown of Aragon to a united Spain. The defeat of the