and al-Dhahabī concurred with him in his abridgement.
In the well-known “dream ḥadith,” Allah, exalted is He, said to His Prophet ﷺ: “O Muhammad, when you perform the prayer say: ‘O Allah, I ask You for doing good deeds, for leaving evil deeds, and for loving the poor. Should You will a trial for Your servants, then take me to Yourself untried.’” Al-Tirmidhī narrated it—and others as well—on the authority of Ibn ʿAbbās (may Allah be pleased with them both), and he declared it ḥasan gharīb. Imām Aḥmad, al-Ḥākim, and others also related it on the authority of Muʿādh ibn Jabal (may Allah be pleased with him).
Al-Ḥākim further reported it from ʿAbd al-Raḥmān ibn ʿĀʾish al-Ḥaḍramī (may Allah be pleased with him), saying, “Its chain is sound, though the two Shaykhs did not include it,” and the ḥāfiẓ al-Dhahabī endorsed this judgment in his Talkhīṣ.
These ḥadiths, together with the verses cited earlier, are a most decisive refutation of those who say that Allah, exalted is He, did not create evil, or that He does not bring it upon any of His creatures—just as the Magians say, and as do the Qadarites, who are the Magians of this ummah.
Al-Khattābī said: They were called Magians because their doctrine parallels that of the Magians, who posit two original principles—light and darkness—claiming that good proceeds from the act of light and evil from the act of darkness, thereby becoming dualists. Similarly, the Qadarites ascribe good to Allah and evil to other than Him.
Yet Allah—glorified and exalted—is the Creator of both good and evil; nothing of either occurs except by His will. He creates evil, in His wisdom, as evil just as He creates good as good. Thus both are attributed to Him in terms of creating and bringing into existence, while they are attributed to His servants in terms of action and acquisition. End of quote.
The finest explanation of the Prophet’s words, “and evil is not attributed to You,” is the one cited by al-Nawawī.