Likewise, this is established by the practice of the Companions: when Ali ibn Abi Talib, may Allah be pleased with him, fought the Khawarij and was told that among their slain was Dhu al-Thudayyah—the one whom the Prophet, may Allah bless him and grant him peace, had foretold would be among them (1)—he prostrated to Allah in gratitude (2). For if Dhu al-Thudayyah was among those whom he fought, then Ali was upon the truth and they were upon falsehood; so he prostrated to Allah in gratitude. Likewise, when Kab ibn Malik, may Allah be pleased with him, heard the voice of the bearer of glad tidings announcing that Allah had accepted his repentance, he prostrated to Allah in gratitude.
Note: The author, may Allah have mercy on him, did not explain how the prostration of gratitude is to be performed. However, the more detailed works explain that it is like the prostration of Quranic recitation. Accordingly, based on the position adopted by the author, one says the takbir when prostrating and when rising, then sits and ends with the salutation of peace.
The correct view is that one says the takbir only when prostrating; one does not say it when rising, nor does one end with the salutation of peace. Even saying the takbir when prostrating is itself open to question, as mentioned previously (3).
The prayer of one who is neither ignorant nor forgetful is invalidated by it ............
His statement, “is invalidated by it,” means: by the prostration of gratitude.
His statement, “the prayer of one who is neither ignorant nor forgetful,” means that whoever performs a prostration of gratitude while knowing the ruling and remembering it, his prayer is invalidated.
An example is a man who, while praying, hears that the Muslims have been victorious in one of their battles, and so he prostrates. We say to this person who prostrated: if you know that