If hypocrisy (riya') befalls the Imam and he indulges in it without repelling it, is he obligated to interrupt his prayer and appoint someone else to lead, due to the invalidity of his prayer?
If a good deed is begun with a pure intention, and then ostentation (riya') occurs during the act, the deed is not invalidated. One should repel the thought of ostentation. If a Muslim continues with the sudden ostentation, some scholars hold that the deed is not nullified, and he will be rewarded for his initial intention.
As for pure ostentation, or ostentation sharing the intention from the very beginning of the deed, it invalidates the deed and renders it void.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/154683