Career
Ibn Mardanīš established his rule over the cities of Murcia, Valencia and Dénia as the power of the Almoravid emirate declined. In the first year of his rule (1147/8), Ibn Mardanīš faced the rebellion of his relative, Yūsuf ibn Hilāl, based in the castle of Montornéson Yūsuf conquered the castles of al-Ṣujayra and al-Ṣajra, and defeated Ibn Mardanīš before the walls of Moratalla, which he occupied.
With a reduced following he attacked the fortress of Peñas de San Pedro and was captured.
Ibn Mardanīš threatened to gouge out his eyes unless he ordered the surrender of Moratalla. He refused and his right eye was removed.
She refused and Yūsuf"s other eye was removed. Ibn Mardanīš then sent his prisoner to Xàtiva, where he died shortly thereafter in 1148 or 1149.
In June 1149, after the republic of Genoa had established colonies at both Almería and Tortosa, Ibn Mardanīš signed a ten-year truce with the republic, agreed to pay 15,000 Almoravid dinars (murābiṭūn) in tribute, exempted the Genoese from tariffs and permitted the establishment of Genoese funduqs at Valencia and Dénia.
The remaining 10,000 was owed over two years. This treaty is preserved in the Genoese Liber iurium. According to the contemporary historian Caffaro, a similar treaty was signed in 1161.
In January 1150, Ibn Mardanīš signed a treaty with the republic of Pisa, promising funduqs and a general safe-conduct for Pisan merchants, but requiring no payment of tribute.
His troops were flanked by the Almohad force at a place called al-Fundūn in the valley of the Guadalentín.