Question
If the imam, having forgotten, prayed one extra rak’ah, and I had joined the congregation later, and I counted this extra rak’ah, will my prayer be valid in this case? If I do not count this extra rak’ah and pray one more rak’ah, what will the ruling be in that case?
Answer
الحمد لله، والصلاة والسلام علىٰ رسول الله، أما بعد!
The correct and preponderant view is that your prayer is valid, because you have performed the complete prayer.
◈ The one extra rak’ah that occurred from the imam was due to forgetfulness and error, so he is excused.
◈ When you counted this extra rak’ah, your prayer was completed.
◈ If you had not counted this extra rak’ah and had prayed one more rak’ah, you would have added a rak’ah without an excuse, because of which your prayer would become invalid.
ھذا ما عندي والله أعلم بالصواب