His realm expanded, but in 393 AH Sultan Maḥmūd ibn Subuktakīn laid siege to him, harassing him and tightening the blockade. Khalaf surrendered to him under a guarantee of safety, whereupon the sultan treated him with honor and sent him, well-attired, to Jūzjān. Four years later someone informed the sultan that Khalaf was exchanging letters with the ruler beyond the Oxus, Ilek Khān, so Maḥmūd again placed him under severe restriction (1).
During his days Khalaf was a generous monarch whose court was always thronged; he was benevolent, munificent, and much praised. He assembled a group of leading scholars and commissioned them to compile a monumental Qurʾān commentary that would gather the views of the exegetes, the reciters, the grammarians, and the ḥadīth specialists.
Abū al-Naḍr states in the book al-Yamīnī: “I was told that he spent twenty thousand dinars on them in a single week.” He adds: “The copy kept in Nīshāpūr is so enormous that it would take a scribe an entire lifetime to reproduce it.”
Abū al-Fath al-Bustī told me: “I composed three verses in praise of King Khalaf. I never delivered them to him, but they became famous; before long, three hundred dinars reached me from him. The verses are:
Khalaf son of Aḥmad—of all successors the most praised,
In nobility he has outstripped the forefathers.
Khalaf son of Aḥmad, a single man in truth,
Yet he rises above unnumbered thousands.
To the illustrious house of al-Layth he has become
What the Prophet was to the clan of ʿAbd Manāf (2).
Al-Badīʿ al-Hamadhānī and others also praised him, and al-Thaʿālibī said of him:
Who is there whose proud stance time will not humble,
Whose steep ascent the passing days will not bend?
Do you not see Khalaf, once the elder of kings,
Now the captive of the man who breached his virgin city? (3)