Abu ʿAbd Allāh Muḥammad ibn Mardanīš was the king of Murcia from AD 1147 until his death. He established his rule over the cities of Murcia, Valencia and Dénia as the power of the Almoravid emirate declined, and he opposed the spread of the Almohad caliphate. Christian sources refer to him as the "Wolf King". Ibn Mardanīš's full name was Abu ʿAbd Allāh Muḥammad ibn Saʿd ibn Muḥammad ibn Aḥmad ibn Mardanīš al-Ȳuḍāmī, indicate he was the son of Saʿd, son of Muḥammad, son of Aḥmad, son of Mardanīš. He was a mūwallad, a descendant of a native Iberian convert to Islam, and his last name is not of Arabic origin. The thirteenth-century Islamic scholarIbn Khallikān derived it from an Ibero-Romance term for dung, perhaps because of Ibn Mardanīš's friendly relations with the Christians. It is more likely a corruption of Merdanix, the name of a tributary of the riverNajerilla, which was on the border between Christian and Islamic Spain in the early tenth century. This hydronym in turn derives from the Latin for dung, indicating dirty waters. This is consistent with Ibn Mardanīš's family emigrating from the aṯ-Ṯaḡr al-Aʿlā around the Rioja, as told in Arabic sources. In the first year of his rule, Ibn Mardanīš faced the rebellion of his relative, Yūsuf ibn Hilāl, based in the castle of Montornés. 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. Ibn Mardanīš then ordered Yūsuf's wife to surrender the castleor else see her husband blinded. 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 in tribute, exempted the Genoese from tariffs and permitted the establishment of Genoese funduqs at Valencia and Dénia. A payment of 5,000 murābiṭūn was due immediately: 3,000 in cash and 2,000 in equivalent silks. 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. During Ḏū l-Qaʿdah 560, Ibn Mardanīš led a large army from Murcia to defend Lorca from an Almohad force advancing from the castle of Vélez. His troops were flanked by the Almohad force at a place called al-Fundūn in the valley of the Guadalentín.