Issue: Prayer behind a disbeliever is categorically invalid, whether his disbelief is through belief, speech, action, or omission.
Disbelief through belief includes, for example, believing that there is another god besides Allah.
Disbelief through speech includes, for example, mocking Allah, His Messenger, or His religion. Whoever mocks Allah, His Messenger, or His religion is a disbeliever, even if he performs the prayer.
Disbelief through action includes, for example, prostrating to someone other than Allah, Most High.
Disbelief through omission includes, for example, abandoning the prayer. However, if his disbelief is due to abandoning the prayer and he then prays, he becomes Muslim. Yet they said: At the time of the opening takbir, he is a disbeliever, because he does not become Muslim except by praying. Accordingly, prayer behind one deemed a disbeliever for abandoning the prayer is invalid.
We know that it is not possible for a Muslim to pray behind a disbeliever. But if it were assumed that someone prayed behind a man and did not learn that he was a disbeliever until after the prayer, must he repeat the prayer or not?
The answer is that some scholars say that he need not repeat the prayer, because he is excused.
Others say that he must repeat the prayer, because one of the conditions for the validity of imamate is that the imam be Muslim.
If someone were to ask: “Can we distinguish between the cases and say that, if the sign of disbelief was apparent upon him, the prayer is invalid and the follower is not excused on account of ignorance, due to the presence of an indication; but otherwise, it is valid?”
The answer is: This distinction is possible. Thus, the preponderant view in this matter is that, if he was unaware, his prayer is valid.