Question
I joined the congregational prayer late and missed some rak'ahs of the prayer. After the Imam finished the prayer, I stood up and completed the rak'ahs, but after the prayer, the Imam realized that he had missed a rak'ah and asked the worshippers to repeat the prayer. Do I have to repeat the prayer with them knowing that I completed all the rak'ahs?
Answer
I say, and with God's help: You are required to repeat the prayer; because you based your prayer on the imam's prayer, and when it became clear that the imam's prayer was invalid, your prayer became invalid as a mandatory prayer and turned into a voluntary one. You must repeat the obligatory prayer, and God knows best.