their troops together, enlisted the Bedouin tribes, and marched on Ramla, where the two armies met (1) in Muharram of the year 367 AH. When the battle lines confronted one another, al-ʿAzīz was astounded by Aftakin’s valor (2). He therefore sent him an offer: if Aftakin would submit and return to his allegiance, the caliph would appoint him commander of the army and overwhelm him with favors.
Aftakin dismounted between the two ranks, kissed the ground facing al-ʿAzīz, and sent word to him (3): “Had this proposal (4) reached me before matters came to this point (5), I could have (6)—indeed I would have hastened to obey (7)—but now it cannot be.” He then remounted, charged the Egyptian left wing, broke its formation, and scattered both its cavalry and infantry. Thereupon al-ʿAzīz himself (8) emerged from the center and ordered the right wing to launch a determined assault. The Qarmati fled, the rest of the Syrians followed, and the Maghrebīs pursued them, killing and capturing whom they pleased.
Al-ʿAzīz pitched his camp in the vacated quarters of the Syrians, dispatched detachments after the fugitives, and rewarded every man who brought him a prisoner with a robe of honor. He set a bounty of one hundred thousand dinars for whoever captured Aftakin. It so happened that, while fleeing, Aftakin was overcome by severe thirst. Passing by Mufarrij ibn Daghfal—an old companion—he begged him for water. Mufarrij gave him to drink, sheltered him in his tents, and sent word to al-ʿAzīz that the man he sought was with him and that the gold should be sent. The caliph forwarded one hundred thousand dinars, and an envoy arrived to receive the prisoner.
Surrounded, Aftakin felt certain he would be killed. Yet as soon as he appeared before ʿAbd al-ʿAzīz (9), the caliph honored him exceedingly, treated him with the utmost respect, restored all his personal effects and wealth so that he lost nothing (10), admitted him to the circle of his closest commanders, lodged him next to his own residence, returned with him to Egypt in high state, and granted him generous fiefs there.
Al-ʿAzīz also wrote to the Qarmati, inviting him to come and promising to honor him as he had honored Aftakin. The Qarmati refused, fearing for his life, so the caliph sent him twenty thousand dinars and fixed the same sum for him each year to restrain his mischief.
Aftakin remained in high favor (11) with al-ʿAzīz until friction arose between him and the vizier Yaʿqūb ibn Killis. The vizier plotted against him, had him poisoned, and he died. When the caliph learned of this, he became enraged with the vizier, imprisoned him for more than forty nights, and extracted from him five hundred thousand dinars; then