حَدَّثَنَا أَحْمَدُ بْنُ شُعَيْبٍ أَبُو عَبْدِ الرَّحْمَنِ النَّسَائِيُّ، أنا مُحَمَّدُ بْنُ رَافِعٍ النَّيْسَابُورِيُّ، ثنا يَحْيَى بْنُ آدَمَ، عَنْ مُفَضَّلِ بْنِ مُهَلْهَلٍ، عَنْ مَنْصُورٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، عَنْ عَبْدِ اللهِ، أَنَّ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلْيَتَحَرَّ الَّذِي يَرَى أَنَّهُ الصَّوَابُ فَلْيُتَمِّمْهُ، ثُمَّ يَسْجُدْ سَجْدَتَيْنِ»
It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "When one of you has a doubt in his prayer, let him seek out what he considers to be correct, then complete it, then perform two prostrations."