II of Aragon, promising him support should he wish to conquer Pisan Sardinia in exchange for Sicily. In 1324, in alliance with the Kingdom of Arborea and following a military campaign that lasted a year or so, the Aragon Crown Prince Alfonso led an Aragonese army that occupied the Pisan territories of Cagliari and Gallura along with the allied city of Sassari, naming them "The Kingdom of Sardinia and Corsica". The kingdom was to remain a dominion of the Crown of Aragon (under the 16th-century kings of Spain) until the Peace of Utrecht. During this period, the Judicate of Arborea promulgated the legal code of the kingdom in the Carta de Logu ('Charter of the Land'). The Carta de Logu was originally compiled by Marianus IV of Arborea, and was amended and updated by Mariano's daughter, Female Judge ( or ) Eleanor of Arborea. The legal code was written in Sardinian and established a whole range of citizens' rights. Among the revolutionary concepts in this Carta de Logu was the right of women to refuse marriage and to own property. In terms of civil liberties, the code made provincial 14th century Sardinia one of the most developed societies in all of Europe. In 1353, Peter IV of Aragon, following Aragonese customs, granted a parliament to the kingdom of Sardinia and Corsica, which was followed by some degree of self-government under a viceroy and judicial independence. This parliament, however, had limited powers. It consisted of high-ranking military commanders, the clergy and the nobility. The kingdom of Aragon also introduced the feudal system into the areas of Sardinia that it ruled. The Sardinian Judicates never adopted feudalism, and Arborea maintained its parliament, called the Corona de Logu 'Crown of the Realm'. In this parliament, apart from the nobles and military commanders, also sat the representatives of each township and village. The Corona de Logu exercised some control over the king: under the rule of the bannus consensus the king could be deposed or even executed if he did not follow the rules of the kingdom. Having broken the alliance with the Crown of Aragon, from 1353 to 1409, the Arborean giudici Marianus IV, Hugh III and Brancaleone Doria (husband of Eleanor of Arborea), succeeded in occupying all of Sardinia except the heavily fortified towns of the Castle of Cagliari and Alghero, which for years remained as the only Aragonese dominions in Sardinia