Ruling on the Imam Returning to the First Tashahhud After Forgetting

Question
We prayed Dhuhr in one of the mosques, and the Imam forgot the middle Tashahhud and stood for the third rak'ah completely. The worshippers reminded him by saying 'Subhanallah', and he returned to the Tashahhud, then completed the prayer. Is our prayer invalid in this case?
Answer
I say, and with God's guidance: It is well-known that the prayer is invalidated due to rejecting a pillar for the sake of an obligation, but it is ruled that it does not invalidate, and God knows best.
imam icon

Send your question to the smart assistant

If the previous answers are not appropriate, please send your question to the Mufti via