Is it obligatory to repeat prayers that were performed in the mosque out of ostentation, or that were accompanied by admiration for people's praise after their completion?
Work must be made sincerely for Allah alone, and one must be warned against mixing it with anything for other than Allah. This is indicated by the Prophet's (peace be upon him) saying, as narrated from his Lord: "I am the One Who is most independent of partners. Whoever performs a deed in which he associates another with Me, I will abandon him and his shirk (polytheism)."
So, if going to the mosque is merely to see people and seek their praise for being committed to congregational prayer, then this is riya' (showing off) from which one must repent by stopping it, regretting it, and intending not to return to it.
The scholar Al-Shinqiti mentioned that riya' has three degrees: intending creation with the deed, desiring Allah's countenance while exposing oneself to the sight of creation, and loving people's awareness of one's rank.
One must increase in seeking forgiveness. There is no need to repeat the prayers as long as the prayer itself was free from riya'.
If going to the mosque was with the intention of performing prayer and sincerely for Allah, and then a thought of admiration arose due to seeing people, this does not harm as long as the primary motive for the action was sincerity. Al-Qarafi said: "If the beginning of that was for Allah, then there is no harm."
Your prayers are valid, and there is no need to repeat them.
It must be noted that abandoning a deed for fear of being accused of riya' is shirk, as Al-Fudayl ibn Iyad said: "Abandoning a deed for the sake of people is riya', and doing a deed for the sake of people is shirk. Sincerity is for Allah to free you from both of them." Therefore, one should not abandon congregational prayer for fear of riya'.
If you do good and people praise you without that being your intention, and you rejoice in this praise, there is no blame upon you, for this is the hastened good tidings for the believer.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/178300