Sahih Bukhari – Hadith No : 1229

Narrated Abu Huraira: The Prophet offered one of the evening prayers (the sub-narrator Muhammad said, “I think that it was most probably the `Asr prayer”) and he finished it after offering two rak`at only. He then stood near a price of wood in front of the Mosque and put his hand over it. Abu Bakr and `Umar were amongst those who were present, but they dared not talk to him about that (because of excessive respect for him), and those who were in a hurry went out. They said, “Has the prayer been reduced?” A man who was called Dhul-Yadain by the Prophet said (to the Prophet), “Has the prayer been reduced or have you forgotten?” He said, “Neither have I forgotten, nor has the prayer been reduced.” He said, “Certainly you have forgotten.” So the Prophet offered two more rak`at and performed Taslim and then said Takbir and performed a prostration of Sahu like his ordinary prostration or a bit longer and then raised his head and said Takbir and then put his head down and performed a prostration like his ordinary prostration or a bit longer, and then raised his head and said Takbir.

Hadith In Arabic Text :

حدثنا حفص بن عمر، حدثنا يزيد بن إبراهيم، عن محمد، عن أبي هريرة رضى الله عنه قال صلى النبي صلى الله عليه وسلم إحدى صلاتى العشي قال محمد وأكثر ظني العصر ركعتين ثم سلم ثم قام إلى خشبة في مقدم المسجد فوضع يده عليها وفيهم أبو بكر وعمر رضى الله عنهما فهابا أن يكلماه وخرج سرعان الناس فقالوا أقصرت الصلاة ورجل يدعوه النبي صلى الله عليه وسلم ذو اليدين فقال أنسيت أم قصرت فقال ‏”‏ لم أنس ولم تقصر ‏”‏‏.‏ قال بلى قد نسيت‏.‏ فصلى ركعتين ثم سلم ثم كبر فسجد مثل سجوده أو أطول، ثم رفع رأسه فكبر، ثم وضع رأسه فكبر فسجد مثل سجوده أو أطول، ثم رفع رأسه وكبر‏.‏

Chapter : Forgetfulness in Prayer – كتاب السهو