(22) باب مَا يَفْعَلُ مَنْ سَلَّمَ مِنْ رَكْعَتَيْنِ نَاسِيًا وَتَكَلَّمَ
It was narrated that Muhammad bin Sirin said:
"Abu Hurairah said: 'The Prophet (ﷺ) led us in one of the nighttime prayers.'" He said: "Abu Hurairah said: 'But I forgot (which one).' He said: 'He led us in praying two rak'ahs, then he said the taslim and went to a piece of wood that was lying in the masjid and leaned his hand on it as if he was angry. Those who were in a hurry left the masjid, and said: "The prayer has been shortened." Among the people were Abu Bakr and 'Umar but they hesitated to ask him for they revere him. Also among the people was a man with long hands who was known as Dhul-Yadain. He said: O Messenger of Allah (ﷺ), did you forget or has the prayer been shortened? He said: I did not forget and the prayer has not been shortened. He said: Is it as Dhul-Yadain says? They said: yes. So he came and prayed what he had missed, then he said the salam, then he said the takbir and prostrated as usual or longer than that. Then he raised his head and said the takbir, and prostrated as usual or longer than that. Then he raised his head and said the takbir.'"
Reference: Sunan an-Nasa'i 1224
In-book reference: Book 13, Hadith 46
English translation: Vol. 2, Book 13, Hadith 1225