One of my friends was praying two rak'ahs to greet the mosque (tahiyyat al-masjid) after the obligatory prayer had finished, which he did not pray so that he could wait for his friends to finish their wudoo' and they could all pray together.
Some other people came and prayed behind him, thinking that he was offering the obligatory prayer, so he intended to offer the obligatory prayer whilst he was still in the first rak'ah. Is his prayer and the prayer ofthe other people valid?
Praise be to Allaah. Firstly, it is not valid to change the intention from naafil to obligatory, because what is required in an obligatory prayer is for the intention to be formed with the opening takbeer, or shortly before it.
An-Nawawi (RAH) said in al-Majmoo' (4/ 183-184): '} AI-Maawardi said: Changing the intention from one prayer to another falls into different categories:
Changing the intention from one obligatory prayer to another: neither of them counts,
Changing the intention from one regular naafil prayer to another, such as Witr to the Sunnah of Fajr neither of them counts. Changing from a naafil prayer to a fard prayer: neither of them counts."
Shaykh Ibn 'Uthaymeen (RAH) was asked about a man who started to pray, then he remembered that he had not prayed 'Isha', so he changed his intention to 'Isha'. Is that valid? He replied: "That is not valid, because the intention for. a specific act of worship must be formed from the beginning, before starting it. If he formed the intention partway through, that implies that the part of it that he did before forming the new intention is devoid of the intention to offer the prayer that he changed to, and the Prophet (sallaallahu alayhi wa sallam) said: Actions are but by intentions and every man will have but that which he intended." So the questioner has to repeat the 'Isha' prayer." Majmoo' Fataawa Ibn 'Uthaymeen. 12/443
With regard to the ruling on the prayer of those who prayed behind him, it is valid insha Allaah, because although the prayer of the imam was not valid as an obligatory prayer, it was still a naafil prayer, because he changed his intention out of ignorance and thinking that doing so was permissible. So it is like one who starts to offer an obligatory prayer before the time for it has begun, thinking that the time has begun, so it counts as a naafil prayer. It is our position that an obligatory prayer offered behind an imam who is praying a naafil prayer is valid. Even if we assume that the imam's prayer was invalid because of that, that does not mean that the prayer of those who prayed behind him is also invalid.
Shaykh Ibn 'Uthaymeen (may Allaah have mercy on him) was asked: "Does the prayer of the congregation become invalid if the prayer of the imam becomes invalid?" He replied: "The prayer of the congregation does not become invalid if the prayer of the imam becomes invalid, because the prayer of the people praying behind him is valid and the basic principle is that it remains valid and it cannot be regarded as invalid unless there is sound evidence to that effect.
The prayer of the imam may become invalid on the grounds of sound evidence, but the person praying is following the command of Allaah and his prayer cannot be deemed invalid except with evidence to that effect. The basic principle is: whoever starts to do an act of worship as prescribed, we cannot rule it to be invalid without evidence.
An exception to that is a case where the imam's position applies to the congregation as well, such as the sutrah (screen). The sutrah of the Imam is also a sutrah for those who are praying behind him. If a woman passes between the imam and his sutrah, then the prayer of the Imam and the prayer of those who are praying behind him are both invalidated, because this sutrah is shared by all of them. Hence we do not tell the people praying behind the imam to use a sutrah, rather if they use a sutrah then this is regarded as going to extremes and as an innovation." [Majmoo' Fataawa Ibn 'Uthaymeen, 12/450] And Allaah knows best.
This article was culled from the publications of Deen Communication Limited