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.