Sunan an-Nasa'i 1243
It was narrated that 'Abdullah said:
"The Messenger of Allah (ﷺ) prayed and did more or less (rak'ahs). When he had said the salam we said: 'O Messenger of Allah (ﷺ), has there been some change concerning the prayer?' He said: 'Why are you asking?' So we told him what he had done. He turned back toward the Qiblah and prostrated two prostrations of forgetfulness, then he turned to face us and said: 'If there had been some change concerning the prayer I would have told you.' Then he said: 'Rather I am a human being and I forget as you forget. If any one of you is not sure about his prayer, let him estimate what he thinks is correct, and complete his prayer on that basis, then say the taslim and prostrate two prostrations of forgetfulness.'"
أَخْبَرَنَا الْحَسَنُ بْنُ إِسْمَاعِيلَ بْنِ سُلَيْمَانَ الْمُجَالِدِيُّ، قَالَ حَدَّثَنَا الْفُضَيْلُ، - يَعْنِي ابْنَ عِيَاضٍ - عَنْ مَنْصُورٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، عَنْ عَبْدِ اللَّهِ، قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم صَلاَةً فَزَادَ فِيهَا أَوْ نَقَصَ فَلَمَّا سَلَّمَ قُلْنَا يَا نَبِيَّ اللَّهِ هَلْ حَدَثَ فِي الصَّلاَةِ شَىْءٌ قَالَ ‏"‏ وَمَا ذَاكَ ‏"‏ ‏.‏ فَذَكَرْنَا لَهُ الَّذِي فَعَلَ فَثَنَى رِجْلَهُ فَاسْتَقْبَلَ الْقِبْلَةَ فَسَجَدَ سَجْدَتَىِ السَّهْوِ ثُمَّ أَقْبَلَ عَلَيْنَا بِوَجْهِهِ فَقَالَ ‏"‏ لَوْ حَدَثَ فِي الصَّلاَةِ شَىْءٌ لأَنْبَأْتُكُمْ بِهِ ‏"‏ ‏.‏ ثُمَّ قَالَ ‏"‏ إِنَّمَا أَنَا بَشَرٌ أَنْسَى كَمَا تَنْسَوْنَ فَأَيُّكُمْ شَكَّ فِي صَلاَتِهِ شَيْئًا فَلْيَتَحَرَّ الَّذِي يَرَى أَنَّهُ صَوَابٌ ثُمَّ يُسَلِّمْ ثُمَّ يَسْجُدْ سَجْدَتَىِ السَّهْوِ ‏"‏ ‏.‏