Hadith 1222

حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ ، حَدَّثَنَا اللَّيْثُ ، عَنْ جَعْفَرٍ ، عَنْ الْأَعْرَجِ , قَالَ : قَالَ أَبُو هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " إِذَا أُذِّنَ بِالصَّلَاةِ أَدْبَرَ الشَّيْطَانُ لَهُ ضُرَاطٌ حَتَّى لَا يَسْمَعَ التَّأْذِينَ ، فَإِذَا سَكَتَ الْمُؤَذِّنُ أَقْبَلَ فَإِذَا ثُوِّبَ أَدْبَرَ ، فَإِذَا سَكَتَ أَقْبَلَ فَلَا يَزَالُ بِالْمَرْءِ يَقُولُ لَهُ اذْكُرْ مَا لَمْ يَكُنْ يَذْكُرُ حَتَّى لَا يَدْرِيَ كَمْ صَلَّى " ، قَالَ أَبُو سَلَمَةَ بْنُ عَبْدِ الرَّحْمَنِ : إِذَا فَعَلَ أَحَدُكُمْ ذَلِكَ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ قَاعِدٌ ، وَسَمِعَهُ أَبُو سَلَمَةَ مِنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ .
Narrated Abu Huraira: Allah's Apostle said, "When the Adhan for the prayer is pronounced, then Satan takes to his heels passing wind so that he may not hear the Adhan and when the Mu'adh-dhin finishes, he comes back; and when the Iqama is pronounced he again takes to his heels and when it is finished, he again comes back and continues reminding the praying person of things that he used not to remember when not in prayer till he forgets how much he has prayed." Abu Salama bin `Abdur-Rahman said, "If anyone of you has such a thing (forgetting the number of rak`at he has prayed) he should perform two prostrations of Sahu (i.e. forgetfulness) while sitting." Abu Salama narrates this from Abu Huraira.
Hadith Reference صحيح البخاري / كتاب العمل في الصلاة / 1222
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Explanation & Benefits
Maulana Dawood Raz
Hadith Commentary:
It is understood that Satan exerts his utmost effort to cast doubts (whispers) during prayer.
Therefore, in this matter, a person is compelled (i.e., not fully in control).
Thus, if due to satanic whispers during prayer, one does not know how many units (rak‘ahs) have been performed, then one should act upon what is certain. If, according to his understanding, the prayer is not complete, he should complete it and then perform two prostrations of forgetfulness (sujud as-sahw).
(Qastallani)
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 1222
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
If a worshipper, due to satanic whisperings, becomes preoccupied with such thoughts and deliberations, this does not invalidate the prayer, provided that no pillar (rukn) of the prayer is omitted.
If any pillar (rukn) of the prayer is left out, then its repetition is necessary, and along with this, the prostration of forgetfulness (sujud as-sahw) must also be performed.
(Fath al-Bari: 3/118)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 1222
Maulana Dawood Raz
Hadith Commentary:
Just as the devil is, so is his passing of wind.
He flees out of aversion to the call to prayer (adhan), and flees with such force that he begins to pass wind.
We affirm and believe in what the Prophet (sallallahu alayhi wa sallam) has said. There are also many human-like devils who detest the beloved sound of the adhan and continually strive to prevent it.
Such people, though outwardly human, are in reality the progeny of the devil.
May Allah destroy them; how deluded they are!
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 3285
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:

Shaytan, out of hatred for the call to prayer (adhan), flees with such force that wind escapes from him.
From this, the existence of Shaytan and his vile characteristic of passing wind upon hearing the sound of the adhan is established.
In this era, there are also many human-like devils who hate the beloved sound of the adhan and try to prevent it.
Such people are outwardly human, but in reality, they are the progeny of Shaytan.

It should be noted that when a person praying becomes doubtful about the number of units (rak‘ahs), he should base his prayer on what he is certain of and complete his prayer accordingly, and then perform two prostrations of forgetfulness (sujud as-sahw) afterwards, so that the mistake may be rectified.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 3285
Maulana Dawood Raz
Hadith Commentary:

Shaytan flees upon hearing the sound of the adhan because it reminds him of the incident of not prostrating to Adam, therefore he does not want to hear the adhan.

Some have said that it is because he does not want to have to bear witness to the adhan on the Day of Judgment.

Since wherever the sound of the adhan reaches, all become witnesses.

Out of this fear, he flees, thinking, "My life is saved, I have gained much."

There are many human-like shayatin as well, who, upon hearing the sound of the adhan, fall asleep or become preoccupied with their worldly affairs and do not present themselves in the mosque for prayer.

These people are no less than the accursed shaytan.

May Allah grant them guidance.
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 608
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
(1)
Imam Bukhari rahimahullah has used the word "ta'dhin" in the chapter heading instead of "adhan" so that the wording matches the hadith, because the word "ta'dhin" appears in the hadith. Although the word "ta'dhin" encompasses the statement, action, and manner of the mu'adhdhin (caller to prayer), in this context, only the words of the adhan are intended. Thus, in a narration of Sahih Muslim it is stated:
“So that he cannot hear its sound.”
(Sahih Muslim, al-Masajid, Hadith: 856 (389))

(2)
The relevance of this hadith to the chapter heading is that it is specifically about the virtue of the adhan, upon hearing which Satan is compelled to flee. Although there are numerous hadiths regarding the virtue of the adhan, Imam Bukhari rahimahullah has selected only this particular hadith because the other virtues related to the adhan can be attained through various good deeds, whereas the unique characteristic of Satan fleeing is exclusively associated with the adhan.
And Allah knows best.

(3)
It is not impossible for air to be expelled from Satan, because he too has a body that requires sustenance. There are several reasons for his passing wind:
• Due to the adhan, he feels a burden, and under this pressure, he expels air.
• By this indecent act, he mocks the adhan, as is the custom of non-believers.
• He does this deliberately so that the sound of the adhan does not reach his ears, because when there is noise nearby, distant sounds cannot be heard.
(Fath al-Bari: 2/113)

(4)
Upon hearing the adhan, Satan is afflicted with a state similar to that of a person who is faced with an extremely distressing and terrifying situation. In such severe circumstances, due to fear, a person’s joints become loose and he loses control over himself. In this helpless state, his urine and air begin to be expelled involuntarily. The accursed Satan, too, when he hears the adhan, experiences the same condition, that is, he flees in panic. In a narration of Sahih Muslim, it is stated that he flees as far as the place of Rauha so that he cannot hear the sound of the adhan, and the place of Rauha is 36 miles from Madinah Tayyibah.
(Fath al-Bari: 2/113)

(5)
From this hadith, it is understood that Satan reminds a person during prayer of things he had forgotten, because a person is more attentive to forgotten matters; hence, forgotten things are mentioned. Otherwise, Satan’s task is to ruin the humility and concentration of the worshipper, and for this, he employs every possible means. To distract the worshipper, he also casts whispers of remembered matters and, to preoccupy him with thoughts, reminds him of forgotten things. These matters may pertain to worldly affairs or religious matters; he even tries to distract through the meanings and secrets of Qur’anic verses.

(6)
The literal meaning of "tathwib" is "to return." In the terminology of the Shari‘ah, it has several meanings, for example:
After the adhan, the mu’adhdhin calling people to prayer is also called tathwib. The Shari‘ah has disliked this act. Similarly, in the morning prayer, saying “al-salatu khayrun min al-nawm” (“prayer is better than sleep”) is also called tathwib. However, in this hadith, tathwib refers to the iqamah (second call to prayer). Since, at the time of the iqamah, the mu’adhdhin returns to and repeats the words of the adhan, the iqamah is called tathwib. In the narration of Sahih Muslim, it is explicitly stated that when Satan hears the iqamah, he flees again.
(Sahih Muslim, al-Masajid, Hadith: 856 (389))

(7)
Apparently, from this hadith, the virtue of the adhan seems greater than that of the prayer, because Satan flees from the adhan, whereas during the prayer he returns and begins to cast whispers. However, in reality, it is the prayer that possesses virtue and superiority, because every thing has its own unique properties. Sometimes, a less valuable thing has benefits that are not found in a better thing. For example:
Senna leaves have the property of being a laxative, even though they are of much lower rank than Khamira Marwarid (a type of medicinal confection), and besides, Khamira Marwarid is not a laxative.
In the adhan, the testimony of faith (shahadatayn) is proclaimed, and according to the hadiths, when the mu’adhdhin gives the adhan, everything within the reach of his voice will bear witness to his faith and deeds, whereas Satan cannot tolerate that anything should bear witness to his faith and deeds; therefore, he cannot bear to hear the adhan.
This characteristic is not found in the prayer, even though it is the most superior act of worship.
In prayer, there is supplication and intimate conversation (munajat), so as soon as the prayer begins, Satan returns and starts casting various whispers.
And Allah knows best.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 608
Shaykh Abdus Salam Bhutvi
Benefits:

➊ The literal meaning of "tathwīb" is "to return." Some have said that it means to shake a cloth to call someone for help, and then it began to be used in the general sense of informing someone. In this hadith, tathwīb refers to saying the iqamah, so that people may gather for prayer. In addition, saying «اَلصَّلَاةُ خَيْرٌ مِّنَ النَّوْمِ» in the adhan is also called tathwīb. Both of these are established from the Messenger of Allah sallallahu alayhi wa sallam. Some forms of tathwīb are innovations (bid‘ah), for example, calling people loudly for prayer after the adhan and before the iqamah is also tathwīb and is an innovation. Abdullah ibn Umar radi Allahu anhuma heard someone doing this in a mosque at the time of Dhuhr or Asr, so he said: "Take me away from here, indeed this is an innovation." [ابو داؤد: 538] Similarly, saying «الصَّلَاةُ وَالسَّلَامُ عَلَيْكَ يَا رَسُوْلَ اللهِ» before the prayer is also tathwīb and an innovation. Saying «حي على خَيْرِ الْعَمَلِ» during the adhan is also tathwīb and an innovation. In addition, the words «أَشْهَدُ أَنَّ عَلِيًّا وَلِيُّ اللَّهِ، وَصِي رَسُولِ اللهِ، خَلِيْفَةٌ بِلَا فَصْلِ» in the adhan are an innovative addition, and the words «وَصِيُّ رَسُولِ اللهِ، خَلِيفَةٌ بِلَا فَضل» are a clear lie.

➋ When the adhan is heard, Satan flees and goes so far away that he cannot hear the adhan. In [صحيح مسلم 388], in the hadith of Jabir radi Allahu anhu, it is stated: "Until he reaches the place of Rawha’." And in this narration of Sahih Muslim, it is also mentioned that the distance between Madinah and Rawha’ is thirty-six (36) miles.

➌ Satan fleeing while passing wind upon hearing the adhan may be involuntary due to fear, as he cannot bear the weight of the words of the adhan, or it may be deliberate, so that he does not hear the words of the adhan. Allamah Waheed al-Zaman writes: Satan flees from the adhan as a thief flees from the police chief. Some have said: Since the adhan is a call to prayer, and in prayer there is prostration (sujud), it reminds him of his own story—that he was cast out for not prostrating to Adam, so he does not want to hear the adhan. Some have said: It is so that he will not have to testify to the adhan in the Hereafter, because wherever the sound of the adhan reaches, all become witnesses and will testify in the Hereafter, as is mentioned in another hadith. [تيسير الباري]

➍ Some people give the adhan at graves; this is an innovation (bid‘ah).

➎ There are other hadiths regarding the virtue of the adhan, some of which Imam Bukhari rahimahullah has mentioned in other chapters, but in the chapter specifically on the virtue of the adhan, he has mentioned only this one hadith, because other virtues may also apply to other deeds, but Satan fleeing in this manner upon hearing the adhan is a unique characteristic of the adhan. [والله اعلم] [فتح الباري]

➏ Ibn Battal said: It appears that one reason for the prohibition of leaving the mosque after the adhan is that in doing so there is a resemblance to Satan fleeing upon hearing the adhan. [فتح الباري]

➐ Satan causes a person to remember things in prayer that he was not remembering at that time, because a person is more interested in such matters, whether religious or worldly; it is possible that with a single scholarly point, he may ruin his prayer, so it is necessary to be wary of his deception.
Source: Fath al-Salam bi Sharh Sahih al-Bukhari al-Imam, Page: 608
Maulana Dawood Raz
Hadith Commentary: That is, for the one who is afflicted with such excessive and boundless doubts (waswasah), merely performing the two prostrations of forgetfulness (sujud as-sahw) is sufficient for him.

Hasan al-Basri and a group from among the Salaf have taken this position, that by this hadith, the person intended is one who is greatly afflicted by doubts, and this is also apparent from the chapter heading of Imam al-Bukhari rahimahullah.

(al-‘Allamah al-Ghaznawi)

And Imam Malik rahimahullah, Imam al-Shafi‘i rahimahullah, and Imam Ahmad rahimahullah interpret this hadith in light of the hadith found in Sahih Muslim and others, narrated from Abu Sa‘id radi Allahu anhu, that if one is in doubt whether it is the second or third (rak‘ah), he should consider it the second, and if in doubt whether it is the third or fourth, he should consider it the third.

After completing the remainder (of the prayer), he should perform the two prostrations of forgetfulness (sujud as-sahw) before the salutation (salam).

(Nasr al-Bari, vol. 1, p. 447)
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 1231
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
(1)
In this hadith, the place for the prostrations of forgetfulness (sujood as-sahw) is not specified—whether they are to be performed before the salutation (salaam) or after it. Its clarification is found in another narration reported by Imam Daraqutni rahimahullah, in which it is stated: If any of you experiences forgetfulness during prayer and cannot determine whether he has performed more or fewer units (rak‘ahs), then he should perform two prostrations while sitting, before the salutation.
(Fath al-Bari: 3/135)
From this narration, it is understood that in the case of doubt, one should perform two prostrations before the salutation.
(Sahih al-Bukhari, Kitab al-Salat, Hadith: 401) (2)
In the case of doubt arising during prayer, there is some detail: If a worshipper becomes doubtful in his prayer, he should strive for correctness and complete his prayer based on his predominant opinion, then offer the salutation.
After the salutation, at the end, he should perform two prostrations of forgetfulness.
(Sunan Daraqutni: 2/40, Dar al-Ma‘rifah edition)
If the correct opinion is not clear, then he should disregard the doubtful rak‘ah and count only those rak‘ahs which are certain, and complete the rest of the prayer based on certainty, as is mentioned in the hadith in which the Messenger of Allah sallallahu alayhi wa sallam said:
“When any of you becomes doubtful during prayer as to how many rak‘ahs he has prayed—three or four?—then he should disregard the doubt and base his prayer on certainty.
Then, before offering the salutation, he should perform two prostrations of forgetfulness.
If he has prayed five rak‘ahs, these prostrations will compensate for the sixth rak‘ah.
And if he has completed the prayer (four rak‘ahs), then these two prostrations will be a means of humiliation and disgrace for Satan.”
(Sahih Muslim, Kitab al-Masajid, Hadith: 1272(571))
Further clarification is found in another hadith in which the Messenger of Allah sallallahu alayhi wa sallam said:
“When any of you becomes doubtful in his prayer and does not know whether he has prayed one rak‘ah or two, then he should consider it as one rak‘ah.
And if he does not know whether he has prayed two or three, then he should consider it as two rak‘ahs.
And if he does not know whether he has prayed three or four, then he should consider it as three rak‘ahs.
Then, when he is about to finish the prayer, before offering the salutation, he should perform two prostrations of forgetfulness while sitting.”
(Musnad Ahmad: 1/190) (3)
In the case of doubt arising during prayer, the research of Shaykh Muhammad ibn Salih al-‘Uthaymeen is as follows:
Hesitation between two matters is called doubt—uncertainty as to which matter has occurred.
In the following three situations, doubt is given no consideration:
٭ If during prayer, a mere suspicion arises which has no reality, such as a whispering (waswasah), etc.
٭ When the worshipper is afflicted with frequent doubts, such that whenever he stands for prayer, he becomes a victim of suspicion.
٭ If doubt arises after completing the act of worship, then no attention should be paid to it unless he is certain.
Apart from these three cases, if doubt arises during prayer, it will be considered, and two situations are possible:
٭ If the worshipper has a leaning towards one side, then he should act according to his inclination, complete his prayer, and offer the salutation, then perform two prostrations of forgetfulness and offer the salutation. For example, if a worshipper, while praying Zuhr, becomes doubtful whether it is his second or third rak‘ah, but his inclination is towards the third, then he should consider it the third, complete his prayer accordingly (i.e., pray the fourth rak‘ah and offer the salutation).
After this, he should perform two prostrations of forgetfulness and offer the salutation, as is mentioned in Sahih al-Bukhari (Hadith: 401).
٭ If the worshipper has no inclination towards either side, then he should disregard the doubt and base his prayer on certainty, which will be the lesser number of rak‘ahs.
Then, after completing the prayer, before the salutation, he should perform two prostrations of forgetfulness and offer the salutation. For example:
If a worshipper, while praying Asr, becomes doubtful whether it is his second or third rak‘ah, but has no inclination towards either, then he should base it on the lesser number, i.e., consider it the second, perform the first tashahhud, then pray two more rak‘ahs, then before the salutation, perform two prostrations of forgetfulness and offer the salutation, as is mentioned in Sahih Muslim (Hadith: 1272 (571)).
(Sujood al-Sahw by Shaykh Muhammad ibn Salih al-‘Uthaymeen)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 1231
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary:
Vocabulary of the Hadith:
(1)
Ahaala:
To run away; to flee.
(2)
Duraat:
Passing wind; to expel air from the anus with a loud sound.

Benefits and Issues:
Since the adhan is the summary and essence of the true religion (din al-haqq), the Prophet (sallallahu alayhi wa sallam) referred to it as an invitation (a complete invitation). And since Satan has hatred and enmity towards the true religion, hearing it is a cause of discomfort for him. Therefore, he cannot tolerate listening to either the takbir or the adhan, and hearing them causes him extreme distress and agitation. In this state of distress, he flees and goes far away.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 856
Shaykh Maulana Abdul Aziz Alvi
Hadith Footnote:
Vocabulary of the Hadith:
Husās:
To break wind,
or to run swiftly.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 857
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: Abu Salih has deduced from the hadith of Abu Hurairah radi Allahu anhu that if someone hears the voice of a jinn, he should give the adhan (call to prayer). From this, some scholars have derived that if the members of a household are troubled by jinn, they should give the adhan. In any case, this is a deduction (istinbat), not something that is Sunnah (prescribed by the Prophet sallallahu alayhi wa sallam).
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 858
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary:
Vocabulary of the Hadith:
(1)
Thuwiba:
The purpose of tathwib is iqamah (the second call to prayer),
because the meaning of thawb is "to return."
(2)
Mu’adhdhin:
After the adhan (call to prayer), he calls again towards the prayer.
Therefore, the takbir (iqamah) is called tathwib.
(3)
Yakhtur:
If the letter "ṭa" is read with a kasrah (i), the meaning will be "to cast a whisper (waswasah),"
if the "ṭa" is read with a dammah (u), the meaning will be "to pass by."
That is, it becomes a barrier between a person and his heart,
so that it diverts him from the original purpose
and occupies him with something else.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 859
Shaykh Umar Farooq Saeedi
516. Commentary:
➊ Apparently, by "Shaytan" is meant Iblis himself, and it is also possible that the devils from among the jinn are intended.
➋ The fact that the Shaytan flees with force and sound is evidence that the blessed words of the adhan (call to prayer) possess weight and significance.
➌ Making noise at the time of adhan is a resemblance to the actions of Shaytan.
➍ Shaytan repeatedly attacks Muslim worshippers, and the Noble Prophet (sallallahu alayhi wa sallam) has also prescribed a remedy: in such a situation, one should recite ta'awwudh (seeking refuge with Allah) and blow lightly to the left. One should consider how severe his attacks must be upon those who do not pray at all.
➎ The voice should be raised well during the adhan. This is a distinguishing sign of Islam and the Muslims. However, the raising of the voice should be to such an extent that it does not become disliked or unpleasant, for along with raising the voice, a pleasant tone is also required and preferred.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 516
Hafiz Muhammad Ameen
1254. Commentary:

➊ The effect of the adhan (call to prayer) may also cause the devil to break wind (just as when a donkey is overloaded, it breaks wind), or it may be so that he cannot hear the adhan (due to the sound of his own breaking wind), or this is an allusion indicating that the adhan is extremely distressing for the devil.

➋ In other narrations, it is also mentioned that after the adhan, the devil returns, and then at the time of the iqamah (second call to prayer), he flees again. See: [صحیح البخاري ، الأذان ، حدیث : 608 ، و صحیح مسلم ، الصلاة ، حدیث : 287] This narration is concise.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 1254
Hafiz Muhammad Ameen
671. Commentary:

➊ "He passes wind (breaks wind)." Clearly, what is meant here is the actual passing of wind (breaking wind). If Shaytan can eat and drink, then why deny the rest of the necessary implications? Some people have interpreted this as meaning 'disgust' or 'aversion.' However, this is an interpretation without any evidence. And Allah knows best.

➋ "He casts whispers." That is, he diverts one's attention from the prayer to other things. May Allah curse him.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 671
Hafiz Zubair Ali Zai
Hadith Authentication: [وأخرجه البخاري 608، من حديث مالك به وفي رواية يحيي بن يحيي : ”للصَّلَاةِ“]
Jurisprudential Points:
➊ Just as with humans, the wind (gas) of Satan is also expelled, and there is nothing surprising about this.
➋ The call to prayer (adhan) and the prayer (salah) are very burdensome upon Satan.
➌ Satan casts whispers (waswasah) into the hearts of people, especially during prayer; therefore, when such a situation arises, seek refuge with Allah, that is, recite the ta‘awwudh and spit lightly to your left three times. [صحيح مسلم : 2203، دارالسلام: 5738]
➎ Giving the call to prayer (adhan) for obligatory prayer is necessary or a highly emphasized Sunnah (sunnah mu’akkadah).
➏ Some people think that at the time of questioning and answering in the grave, Satan tries to mislead the deceased, so the adhan should be given at that time; however, there is no evidence for this notion from the pious predecessors (salaf salihin).
➐ Some people start giving adhans to ward off calamities, but there is no evidence for this. However, giving the adhan to drive away jinn and devils is permissible. See [التمهيد 309/18، 310]
➑ Saying the iqamah for congregational prayer is a highly emphasized Sunnah (sunnah mu’akkadah).
Source: Muwatta Imam Malik (Narration of Ibn al-Qasim): Commentary by Zubair Ali Zai, Page: 324
Shaykh Muhammad Ibrahim bin Basheer
Benefit:
From this hadith, it is understood that if a person forgets during the prayer, he should perform two prostrations (sajdah sahw) at the end of the prayer. This hadith also proves that even during prayer, Shaytan does not leave a person; he is making every possible effort. A person should always keep the remembrance of Allah on his tongue.
Source: Musnad al-Humaydi: Commentary by Muhammad Ibrahim bin Bashir, Page: 976