Who prayed and doubted the number of rak'ahs

Question
Who prayed and doubted whether he was in the third or fourth rak'ah, and his wife who was praying with him realized this and immediately reminded him by saying (Allahu Akbar), and he immediately stood up for the fourth rak'ah, does he have to perform prostration for forgetfulness?
Answer
I say, and with God's success: as long as he did not prolong his sitting without prostration for forgetfulness, 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