Do you believe that the knowledge of the Prophet (Allah bless him and grant him peace) is equal to the knowledge of Zayd, Bakr and beasts or are you innocent of such [a belief]? Did Shaykh Ashraf ‘Ali al-Thanawi write such content in his treatise Hifz al-Iman or not? How do you judge one who believes this?
I say: this too is from the inventions and lies of the innovators. They distorted the meaning of the statement and, in their hatred, they produced the opposite of what the shaykh (Allah lengthen his shadow) intended (Allah confound them! How they are perverted!).
Shaykh ‘Allamah al-Thanawi in his treatise called Hifz al-Iman, which is a small treatise in which he answered three questions he was asked: the first is in regards to the prostration of respect (al-sajdat al-ta’zimiyyah) to graves, the second is in regards to circumambulation (tawaf) around graves and the third is in regards to the unqualified usage of the term ‘alim al-ghayb (Knower of the Unseen) for our master, the Messenger of Allah (Allah bless him and grant him peace); the shaykh said, the upshot of which is:
This usage is not permissible even if it was with a [particular] interpretation, because it conceives of shirk, just as the usage of their statement ra’ina was prohibited in the Qur’an (2:104) and their statement “my male slave” (‘abdi) and “my female slave” (amati) [was prohibited] in the hadith, as transmitted by Muslim in his Sahih (Kitab al-Alfaz min al-Adab wa Ghayriha); since the general [usage of the term] ghayb in the legal usages is that for which no proof was erected and there is no means or path to its perception. [Based] on this, Allah (Exalted is He) said, “Say: None in the heavens or on earth, except Allah, knows the ghayb” (27:65), “Had I knowledge of the ghayb, I should have abundance of wealth” (7:188) and other verses. If this were allowed by interpretation, it would entail that it would be correct to use khaliq (Creator), raziq (Sustainer), malik (Master), ma’bud (Deity) and other attributes of Allah (Exalted is He), exclusive to His (Exalted is He) Essence, for the creation by an interpretation. It would also imply that by another interpretation the use of the term ‘alim al ghayb would be negated from Allah (Exalted is He), since He (Exalted is He) is not the knower of ghayb by means of a medium or by accident, so would any sane religious person allow its negation [from Him]? Far be it, of course not.
Moreover, if this usage were correct for his holy essence (Allah bless him and grant him peace) according to the statement of a questioner, we will ask for clarification from him: what does he mean by this ghayb? Does he mean every particular from the particulars of ghayb or a part of it, whichever part it may be? If he intended a part of the ghayb, there is no speciality in this for the Chief of Messengers (Allah bless him and grant him peace), since the knowledge of some ghayb, even if it is little, is attainable by Zayd and ‘Amr, rather every child and madman, rather all animals and beasts, because every one of them knows something another does not know and [something that is] hidden from him. Hence, if the questioner permits the usage [of the term] ‘alim al ghayb for one because of his knowledge of a part of the ghayb, it would be necessary for him to allow its usage for all those mentioned, and if that was the case, it would not then be from the perfections of prophethood because they all share in it; and if it is not the case, he will be asked for a distinction, and will find no path to it. [Here] ends the statement of Shaykh al-Thanawi.
So look, Allah have mercy on you, at the statement of the shaykh. You will not find even a trace of what the innovators invented. How farfetched for any Muslim to claim that the knowledge of Allah’s Messenger (Allah bless him and grant him peace) is equal to the knowledge of Zayd, Bakr and beasts. Rather, the shaykh ruled by way of implication that one who claimed the permissibility of using knowledge of the ghayb for Allah’s Messenger (Allah bless him and grant him peace) due to his knowledge of part of the ghayb, that it would be necessary for him to allow its usage for all men and beasts. How far this is from the equivalence of knowledge, which they fabricated about him! Allah’s curse be on the liars.
We are convinced that any who believes that the knowledge of the Prophet (upon him be peace) is equal to [the knowledge of] Zayd, Bakr, beasts and madmen, is an absolute disbeliever. Far be it that the shaykh (his glory continue!) say such [a thing], and this would indeed be a strange thing.
Al-Muhannad ‘ala l-Mufannad ya’ni ‘Aqa’id ‘Ulama Ahl al-Sunnah Deoband, pp. 61-64