In 1015 and again in 1016, the forces of Mujāhid al-ʿĀmirī from the taifa of Denia and the Balearics, in the east of Muslim Spain (al-Andalus), attacked Sardinia and attempted to establish control over it. In both these years joint expeditions from the maritime republics of Pisa and Genoa repelled the invaders. These Pisan–Genoese expeditions to Sardinia were approved and supported by the Papacy, and modern historians often see them as proto-Crusades. After their victory, the Italian cities turned on each other, and the Pisans obtained hegemony over the island at the expense of their erstwhile ally. For this reason, the Christian sources for the expedition are primarily from Pisa, which celebrated its double victory over the Muslims and the Genoese with an inscription on the walls of its Duomo. Background Denia had perhaps hosted a naval squadron under the Caliphs of Córdoba in the tenth century; its port was "very good and very old". According to al-Idrīsī, as quoted in al-Himyarī, its shipyards were important in outfitting the caliphal fleet, and the fleet launched against Sardinia may have originated in them. In 940 or 941, the Caliphate signed treaties with Amalfi, Barcelona, Narbonne and the judgeships of Sardinia promising safe conduct in the western Mediterranean, an area where they had been subject to raids from Muslim pirates based out of Fraxinetum, the Balearic Islands and the eastern ports of Spain, the so-called Sharq al-Andalus (including Denia and the famous pirate base at Pechina). There is a record of an embassy from Sardinia to Córdoba shortly after the treaty, and from 943 to c. 1000 there are no recorded Muslim attacks on the Christian ports of the western Mediterranean. The Carolingian navy had a presence in both Pisa and Genoa in the early ninth century. The north Italian cities had sent ships to protect Sardinia from a Muslim fleet in 829, but it was probably a Muslim fleet operating out of Sardinia that raided Rome in 841. The period of the late tenth and early eleventh centuries corresponded with a large growth in Pisa's population and in its geographical extent: its walls and fortifications doubled in scope as its suburbs grew. It entered into frequent territorial disputes with neighbouring Lucca, often violent, and its need for imports grew commensurately. Genoa, with even less hinterland to support its citizens and its shipyards, was also pressured into looking for new markets. The