to prayer, Satan turns and flees, passing wind so that he cannot hear the call. When the call ends, he returns. When the call to commence the prayer is given, he flees again, then returns when it ends, intruding upon a person’s thoughts and saying: ‘Remember this, remember that,’ reminding him of things he had not been thinking about, until he no longer knows how many units he has prayed. If any of you experiences this, let him perform two prostrations.”
The Prophet—may Allah bless him and grant him peace—thus explained that Satan reminds a person of things until he no longer knows how many units he has prayed. He instructed him to perform two prostrations for forgetfulness, but did not instruct him to repeat the prayer, nor did he distinguish between a little distraction and a great deal. This view is more fitting and balanced, for the scriptural texts and transmitted reports establish only that reward and recompense depend on attentiveness. They do not establish an obligation to repeat the prayer, whether with regard to its inward or outward validity. And Allah knows best.
He—may Allah have mercy on him—was asked:
What if a person praying enters a state of ritual impurity before the closing salutation?
He replied:
If a person praying enters a state of ritual impurity before the closing salutation, his prayer is invalid, whether obligatory or non-obligatory.