(وَعَنْهُ مِنْ طَرِيقٍ ثَانٍ) عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: ((إِذَا شَكَكْتَ فِي صَلَاتِكَ وَأَنْتَ جَالِسٌ فَلَمْ تَدْرِ ثَلَاثًا صَلَّيْتَ أَمْ أَرْبَعًا، فَإِنْ كَانَ أَكْبَرُ ظَنِّكَ أَنَّكَ صَلَّيْتَ ثَلَاثًا فَقُمْ فَارْكَعْ رَكْعَةً ثُمَّ سَلِّمْ ثُمَّ اسْجُدْ سَجْدَتَيْنِ ثُمَّ تَشَهَّدْ ثُمَّ سَلِّمْ، وَإِنْ كَانَ أَكْبَرُ ظَنِّكَ أَنَّكَ صَلَّيْتَ أَرْبَعًا فَسَلِّمْ ثُمَّ اسْجُدْ سَجْدَتَيْنِ ثُمَّ تَشَهَّدْ ثُمَّ سَلِّمْ))
(Second chain) Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: When you have doubt in your prayer while you are sitting and you cannot determine whether you have prayed three rak'ahs or four, then if your predominant assumption is that you have prayed three rak'ahs, stand up and perform one rak'ah, then say salam, then perform two prostrations, then recite tashahhud, and then say salam again. And if your predominant assumption is that you have prayed four rak'ahs, then say salam, then perform two prostrations, then recite tashahhud, and then say salam again.