It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) once performed five rak'ahs in the Zuhr prayer. When he was informed about it, he (peace and blessings be upon him) performed two (prostrations of) forgetfulness (sujood as-sahw).
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1537
Hadith Takhrijاس روایت کی سند صحیح ہے اور حدیث متفق علیہ ہے۔ دیکھئے: [بخاري 404] ، [مسلم 572] ، [أبوداؤد 1019] ، [ترمذي 392] ، [نسائي 1253، 1254] ، [ابن ماجه 1205] ، [أبويعلی 5002] ، [ابن حبان 2656] ، [مسند الحميدي 96]
Brief Explanation
(Commentary on Hadiths 1535 to 1537)
From the above-mentioned three hadiths, it is established that even prophets can make mistakes or forget, and it is also understood that if, under the impression that the prayer (salah) has been completed, someone speaks during the prayer, then it is not obligatory to repeat the prayer from the beginning. This is because the Prophet sallallahu alayhi wa sallam himself neither repeated the prayer from the beginning nor commanded the people to repeat it.
Furthermore, the prostration of forgetfulness (sujud as-sahw) is also established from these hadiths. Now, whether the prostration of forgetfulness should be performed before the salutation (salam) or after it, its details are coming ahead.
This hadith is famous from Dhu’l-Yadayn or Dhu’l-Shimalayn, whose name was Khirbaq.