وَالدَّلِيلِ عَلَى أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّمَا أَمَرَ الشَّاكَّ فِي صَلَاتِهِ بِسَجْدَتَيِ السَّهْوِ بَعْدَمَا يَبْنِي عَلَى الْأَقَلِّ، فَيُتَمِّمُ صَلَاتَهُ عَلَى يَقِينٍ إِذَا لَمْ يَكُنْ لَهُ تَحَرٍّ
And the evidence that the Prophet, peace and blessings be upon him, only commanded the one who is doubtful in his prayer to perform the two prostrations of forgetfulness after he builds upon the lesser (number), so he completes his prayer based on certainty if he does not have any inclination.
Sayyiduna Abu Sa'id Khudri (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings of Allah be upon him) said: "When any of you has doubt in his prayer, he should leave the doubt and act upon what is certain. Then, if he becomes certain that his prayer is complete, he should perform two (prostrations of forgetfulness) sajdahs. If his prayer was complete, then that rak'ah and the two sajdahs will be counted as voluntary (nafl) acts, and if the prayer was not complete, then this rak'ah will complete his prayer and the two sajdahs will be a means of humiliating and disgracing Satan."
Explanation & Benefits
Shaykh Muhammad Farooq Rafi
Benefits:
➊ Whoever is in doubt about the number of rak'ahs of the prayer should build upon the lesser number.
❀ Sayyiduna Abdul Rahman bin Awf radi Allahu anhu narrates that the Messenger of Allah sallallahu alayhi wa sallam said:
«إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلَمْ يَدْرَا وَاحِدَةً صَلَّى أَمْ ثِنْتَيْنِ فَلْيَجْعَلْهَا وَاحِدَةً، وَإِذَا لَمْ يَدْرِ ثِنْتَيْنِ صَلَّى أَمْ ثَلَاثًا فَلْيَجْعَلْهَا ثِنْتَيْنِ، وَإِذَا لَمْ يَدْرِ ثَلَاثًا صَلَّى أَمْ أَرْبَعًا فَلْيَجْعَلْهَا ثَلَاثًا، ثُمَّ يَسْجُدُ إِذَا فَرَغَ مِنْ صَلَاتِهِ، وَهُوَ جَالِسٌ قَبْلَ أَنْ يُسَلَّمَ سَجْدَتَيْنِ»
"When any one of you is in doubt in his prayer and does not know whether he has prayed one rak'ah or two, let him count it as one; when he does not know whether he has prayed two rak'ahs or three, let him count it as two; and when he does not know whether he has prayed three rak'ahs or four, let him count it as three. Then, after finishing his prayer and before the salam, he should perform two prostrations." [Musnad Ahmad: 190/1, Sunan Ibn Majah: 1209, al-Silsilah al-Sahihah: 1356, Sahih]
➋ The two prostrations of forgetfulness (sajdat al-sahw) make up for any deficiency or excess that occurred in the prayer.
Moreover, this act is a cause of humiliation and disgrace for Satan, because through doubt and confusion Satan wants to diminish the worshipper's prayer.
But when the deficiency in his prayer is remedied by the two prostrations of forgetfulness, this act becomes a cause of Satan's disgrace and humiliation.
➌ If doubt arises in the fourth rak'ah as to whether it is the third rak'ah or the fourth, then it will be counted as the third rak'ah; and if it was in fact the fourth rak'ah, then the two prostrations of forgetfulness become a cause of Satan's humiliation.
Source: Sahih Ibn Khuzaymah: Commentary by Muhammad Farooq Rafee, Page: 1023