So Ibn Ghāniya fought on for the rest of the day. He had with him a Byzantine intermediary, whom he dispatched to the Byzantine king, asking him to renew his pact in return for the money he had set aside for him. The king thereupon broke off hostilities, and Ibn Ghāniya went out to meet him with the agreed sum. He reminded the king of the situation of the Maṣāmida Berbers and warned him about ʿAbd al-Muʾmin ibn ʿAlī, saying, “I am your servant in this land and a shield between you and ʿAbd al-Muʾmin.” At that time the Maṣāmida carried great weight in people’s minds, so the king appointed him governor of the city and then withdrew with his entire force.
Ibn Ghāniya likewise withdrew, heading for Seville. Abū al-Ghamr—acting as ʿAbd al-Muʾmin’s deputy—entered Córdoba. He was Abū al-Ghamr ibn Ghalbūn, a renowned champion and the lord of Ronda.
In Seville and its environs Abū al-Ḥasan ʿAlī ibn Maymūn rose in revolt, and in every district a different leader took up arms. In the end they all agreed to permit the Maṣāmida, who styled themselves the Muwaḥḥidūn, to pass from Ceuta to Algeciras. Major upheavals ensued: the Almoravid state collapsed, and the Almohad state dawned.
Ibn Ḥamdīn was born in Córdoba sometime before 500 AH.
He was the judge Abū Jaʿfar Ḥamdīn ibn Muḥammad ibn ʿAlī ibn Muḥammad ibn ʿAbd al-ʿAzīz ibn Ḥamdīn al-Thaʿlabī, chief qāḍī of Córdoba.
He assumed the judiciary in 529 AH, after the martyrdom of the judge Abū ʿAbd Allāh ibn al-Ḥājj.
From a household of dignity and prestige, he became the leading figure in Córdoba when the affairs of the veiled Almoravids fell into disorder and Ibn Qasī rose against them near al-Andalus. In Ramaḍān 539 AH Ibn Ḥamdīn received the title “Commander of the Muslims, made victorious by Allah,” and his name was mentioned in the Friday sermon on most pulpits of al-Andalus. This, however, did not last long. Misfortunes soon beset him—stories too lengthy to relate here. He later moved to Málaga, where he lived in obscurity until his death in 548 AH.