Is setting the intention to end the prayer also one of the requisites of prayer? If I was distracted and just gave salam without my mind and heart present at the moment, is my prayer valid?
Alhamdulillah, praise and thanks to Allah for the countless blessings He has blessed us all with. Blessings and salutations to the Prophet Muhammad PBUH, his family, companions and all those that follow his teachings to the day of judgement.
Indeed, there is an opinion which states that setting the intention to end prayer is one of the requisites in it. Among them is what is mentioned by Imam Abu Syuja’ Ahmad bin al-Husain al-Asfahani in his matn:
وأركان الصلاة ثمانية عشر ركنا….. ونية الخروج من الصلاة
And (there are) eighteen requisites of prayer, (one of them) is setting the intention to end the prayer. (Refer Matan Abi Syuja’, pg 9)
However, the scholars commented on this matn, among them is Sheikh Taqiyuddin al-Hisni who made tarjih of the opinion which does not put it as the rukn:
وَهل تجب نِيَّة الْخُرُوج من الصَّلَاة فِيهِ وَجْهَان: أَحدهمَا تجب وَهُوَ اخْتِيَار الشَّيْخ لِأَن السَّلَام ذكر وَاجِب فِي أحد طرفِي الصَّلَاة فَتجب فِيهِ النِّيَّة كتكبيرة الْإِحْرَام وَلِأَن السَّلَام لفظ آدَمِيّ يُنَاقض الصَّلَاة فِي وَضعه فَلَا بُد فِيهِ من نِيَّة تميزه وأصحهما أَنَّهَا لَا تجب قِيَاسا على سَائِر الْعِبَادَات
Is it wajib to set the intention to end the prayer? There are two opinions: One of them is it is wajib, and it is the opinion chosen by Sheikh (Abu Syuja’), because giving salam is one of the wajib dhikr in one of the parts (الطرف) in prayer (which is takbiratul ihram at the beginning, salam at the end); so, it is wajib to set the intention to end the prayer whilst giving salam as it is wajib to set the intention to start it during takbiratul ihram.
Salam is also one’s uttering which invalidate his prayer when uttered in its place. So, the intention is needed while saying it as differentiation.
However, the more sahih opinion is it is not wajib to set the intention to end the prayer, according to the qiyas (analogical deduction) to other acts of worship which do not obligate it. (Refer Kifayah al-Akhyar fi Halli Ghayah al-Ikhtisar pg. 110; Refer also Al-Iqna’ fi Halli Alfaz Abi Syuja’ 1/128 by Imam Khatib al-Syirbini, Minhaj al-Tolibin wa ‘Umdah al-Muftin pg. 29 and Mughni al-Muhtaj 1/340).
Even if the final opinion is it is not a rukn, the scholars like Imam al-Khatib al-Sharbini, Imam Zainuddin al-Malibari state that it is Sunnah to set the intention to end the prayer to acknowledge the scholars who obligate it as well as avoiding the khilaf.
وَلَكِنْ تُسَنُّ خُرُوجًا مِنْ الْخِلَافِ
However, it is Sunnah to set the intention to end the prayer avoid the khilaf. (Refer Mughni al-Muhtaj 1/385 and Fath al-Mu’in pg. 123)
This is in accordance with an Islamic legal maxim:
الخروج من الخلاف مستحب
Avoiding the khilaf is highly encouraged
However, Sheikh Abu Bakar al-Dimyati reminds that:
(يسن نية الخروج من الصلاة بالتسليمة الأولى) أي عند ابتدائها. فإن نوى قبلها بطلت صلاته
It is Sunnah to set the intention to end the prayer whilst giving the first salam, which is at the beginning of the salam. If he sets the intention before it, his prayer is invalidated. (Refer I’anah al-Tolibin fi Halli Alfaz Fath al-Mu’in 1/207. Refer also Ghayah al-Bayan Syarh Zubad ibn Ruslan pg. 98 by Imam Syamsuddin al-Ramli)
Consequently, the final opinion in madhhab al-Shafi’e states that setting the intention to end the prayer whilst giving the first salam is not one of the requisites in prayer. However, scholars state that it is Sunnah to avoid khilaf.
Nevertheless, the setting of intention should be whilst give the first salam, and if one intends before it, then his prayer is invalidated.