Sunan Abi Dawud, Hadith 1022

Zaid b. Aslam reported on the authority of the chain of Malik: The Prophet said: If one of you is in doubt about his prayer, and if he is sure that he prayed three rak'ah, he should stand and complete one rak'ah along with its prostrations. Then he should sit and recite the tashahhud. When he finishes the prayer, and there remains nothing except salutation, he should make two prostrations while he is sitting and afterwards should give the salutation. The narrator then narrated the tradition similar to that of Malik. Abu Dawud said: Similarly, this tradition has been narrated by Ibn Wahb from Malik, Hafs b. Maisarah, Dawud b. Qais and Hisham b. Sa'd. But Hisham projected it to Abu Sa'id al-Khudri.

حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا يَعْقُوبُ بْنُ عَبْدِ الرَّحْمَنِ الْقَارِيُّ، عَنْ زَيْدِ بْنِ أَسْلَمَ، بِإِسْنَادِ مَالِكٍ قَالَ إِنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا شَكَّ أَحَدُكُمْ فِي صَلاَتِهِ فَإِنِ اسْتَيْقَنَ أَنْ قَدْ صَلَّى ثَلاَثًا فَلْيَقُمْ فَلْيُتِمَّ رَكْعَةً بِسُجُودِهَا ثُمَّ يَجْلِسْ فَيَتَشَهَّدْ فَإِذَا فَرَغَ فَلَمْ يَبْقَ إِلاَّ أَنْ يُسَلِّمَ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ ثُمَّ لْيُسَلِّمْ ‏" ‏ ‏.‏ ثُمَّ ذَكَرَ مَعْنَى مَالِكٍ ‏.‏ قَالَ أَبُو دَاوُدَ كَذَلِكَ رَوَاهُ ابْنُ وَهْبٍ عَنْ مَالِكٍ وَحَفْصِ بْنِ مَيْسَرَةَ وَدَاوُدَ بْنِ قَيْسٍ وَهِشَامِ بْنِ سَعْدٍ إِلاَّ أَنَّ هِشَامًا بَلَغَ بِهِ أَبَا سَعِيدٍ الْخُدْرِيَّ ‏.‏

sunnah.com