Sahih al-Bukhari 401
ʿAbd Allāh [ibn Masʿūd] narrated that the Prophet (saw) offered Prayer – Ibrāhīm said: ‘I do not know whether he [the Prophet (saw)] offered more or less [than required]’ – so when the Prophet (saw) concluded the Prayer with taslīm, he was asked: ‘O Messenger of Allāh, did something change in the Prayer?’ He replied, asking: ‘And what might that be?’ They said: ‘You prayed in such and such a way.’ Hearing this, he turned on his feet, faced the Qiblah, performed two additional prostrations, and then concluded with taslīm. When he turned his face towards us, he said: ‘If anything had changed in the Prayer, I would have told you about it, but I am merely a human like you. I forget just as you forget, so when I forget, remind me, and when one of you is uncertain about his Prayer, he should go by what is correct, and complete it. Then he should perform taslīm, and then perform two prostrations.’
Translation: Ahmadiyya Muslim Jamaat