Imam ash-Shirazi, may Allah have mercy upon him, in the Muhaźźab said:

It is not offensive, in these periods, those with reason such as qadha’ (making up) due to missed prayers, naźr prayers (due to a vow), the tilāwa prostration (due to recitation of specific verses) , the prayer of jenāza (due to a deceased) and the likes of it. This is due to a narration of Qais bin Fahd, may Allah be pleased with him who said { The Prophet of Allah, Allah’s Salutation and Peace upon him, saw me while I was praying two raka’as of prayers after Śubh, and he said What are these prayers? I said, I did not pray the two raka’s of fajr, so these are the two raka’as }. If one enters the mosque during these periods solely to pray the tahiya prayers (prayers of greeting) without any other needs, then there are two wajh (opinions of the ashāb) with regard to it. The first is that it is permissible for him to pray because there is a reason for the prayer which is the entering into the mosque. The second is that he does not pray because the Prophet, Allah’s Salutation and Peace be upon him said “Do not seek to perform your prayers during sunset or sunrise”, while this is a case of seeking prayers during sun rise and sun set.


Imam an-Nawawi may Allah have mercy upon him commenting on the above said:

The Hadith

The hadīth of Qais bin Fahd is narrated by Abu Daud, Tirmiźi, Ibn Majah and others. It’s chain is weak due to discontinuity. at-Tirmiźi said: The aśah (relied upon) view is that it is mursal and is a narration from Qais bin Fahd as mentioned by the author. Abu Daud and many other narrated: Qais bin ‘Amr and it is śaheeh according to the jumhūr of the imams of hadīth. I have analyzed this in the Tahźīb al-Asmā’ and how it was. The matn of the hadīth, on the other hand is regarded weak by the scholars of hadīth but it is supported by sound hadīths which we will mention, inshāAllahu ta’āla.
As for the hadīth : { Do not seek to perform your prayers during sun rise and sun set }, it is narrated by both al-Bukhāri and Muslim from the narration of Ibn ‘Umar, may Allah be pleased with him from the Prophet, Allah’s Salutation and Peace upon him.

The Ruling

As for the ruling of the matter, our maźhab is: that the prohibition to pray in these periods are specifically for those without reason. As for the prayers with sabab (reason), there is no offensiveness to perform them. The nature of the sababs here are those that are mutaqaddim (prior to the prayer itself) such as the elapse of an obligatory or nafl prayer, provided we say it is sunna according to the aśah view to qadha’ the nafl prayer. The sababs considered here includes the qadha’ of the obligatory, the qadha’ of rawātib and other prayers, as well as qadha’ of nafl prayers taken as wird (done regularly) during these periods. It also includes naźr prayers, the prayers of jenāza, the tilāwa and shukr prostrations, the prayer of kusūf (eclipse) and the prayer of tawāf. If one does wudhū’ during these periods, then it also includes the prayer of wudhū’ as clarified by a group of our aśhab, amongst them ar-Rāfi’ī. It is offensive to pray during these periods the prayer of istikhāra as clarified by al-Baghawi and others. It is also offensive two pray the two rak’aas of ihram for haj as per the aśah of two wajhs, and this is affirmed by the jumhūr, because the sabab is mutaakhir (after the prayer). This is the ruling affirmed by al-Bandaniji mentioned in the Book of Hajj. The second wajh is that it is not offensive as mentioned by al-Baghawi and others because the sabab is the desire to carry out ihrām, and thus it is mutaqaddim. This wajh is qawi (strong).
With regard to the prayer of istisqā’ (seeking rain) , there are two wajhs attributed to the Khurāsānis. The aśah view is that it is not offensive as narrated by Imam al-Haramain and al-Ghazzali in the Basīt from numerous scholars. This is affirmed by al-Qādhi Abu Tayyib in his Ta’līq and by al-‘abdari as well. This is because it’s sabab is mutaqaddim. The second wajh is that it is offensive just like the prayer of istikhāra. Such was how they justified it. Ar-Rāfi’ī said: The former has certainly denied the offensiveness of the prayer of istikhāra. As for the tahiya of the mosque, our ashāb said: if one enters with a purpose such as i’tikāf, seeking knowledge, waiting for the next prayer and the likes of it, he should pray the tahiya. If one enters solely to do the tahiya, without any other needs, there are two wajhs. The more rājih wajh is that similar to the case of one who purposely delay the elapsed prayer so that he makes qadha’ during these periods. These are certainly offensive due the saying of the Prophet, Salutations of Allah and His Peace, {do not seek to perform your prayers during sun rise or sun set}. The second wajh is that it is not offensive. This is the opinion of Imam al-Haramain, al-Ghazzali in the Basīt. The author of al-Bayan and others has narrated a wajh that state the offensiveness of praying the tahiya in these periods without any elaboration. This is a mistake, I have warned about it so that one is not misled by it. Aś-Śoidalani, Imam al-Haramain and al-Ghazzali in al-Basīt had also previously narrated it from Abu ‘Abdillah az-Zubairi and they have agreed on it being a mistake.
If one misses a rawātib or nafl prayer that is taken as a wird, and he makes qadhā’ for it in these periods, is it ok for him to continually repeat as such in these offensive periods? There are two wajh with regards to this as narrated by Sheikh Abu Hāmid al-Bandaniji, Qadhi Abu Tayyib, al-Mutawalli and others. One of them: Yes, as narrated by Abu Hāmid from Abu Ishaq al-Marwazi due to the śaheeh hadīth {that the Prophet, Allah’s Salutation and Peace upon him, missed two raka’as of sunnah žhuhr, and he did qadha’ after ‘Ásr and continued to so after Ásr narrated by al-Bukhari and Muslim. And the aśah wajh is that this is from the khaśais (rulings specific) of the Prophet, Allah’s Salutation and Peace upon him. Amongst those who considered it to be śahīh is ash-Sheikh Abu Hāmīd.

Mazhab of the Scholars: Prayers with Sabab in these Periods

We have mentioned earlier that in our Mazhab, it is not offensive. ‘Ali bin Abi Tālib, az-Zubair bin ‘Awwam, his son, Abu Ayyub, an-Nu’mān bin Bashīr, Tamīm ad-Dāri, and ‘Āisha, may Allah be pleased with them are of this opinion. Abu Hanīfa said: None of these are permissible. We however concur with the jumhūr of the jurists that it is permissible to pray missed prayers during these periods. Abū Hanīfa said: Missed prayers are allowed after Śubh and ‘Ásr. It is not allowed to pray in the three periods except ‘Ásr of that day, and therefore it is permissible at the time of isfirār. The naźr prayers is allowed during these times in our opinion, but not permissible according to Abu Hanīfa. Ibnu al-Munźir said: There is ijmā’ amongst the Muslims of the permissibility to pray the Jenāza prayers after Śubh and ‘Àsr. Al-‘Abdari cited in his Book of Jenāza from ath-Thauri, al-Awzā’ie, Abū Hanīfa, Ahmad and Ishāq that the prayer of Jenāza is prohibited at the time of sunrise, sunset and its istiwā and it is not prohibited in the other two times. Al-Qadhi ‘Iyādh cited in the commentary of Śahīh Muslim from Daud azh-Zhāhiri that prayers are permissible for a sabab and without sabab at all times. The mashhūr view in the maźhab of Daud is the prohibition of prayer in these times whether or not there is sabab. It is also a narration from Ahmad. Abū Hanīfa and those who are in agreement with him in this matter made hujja with the generality of the śahīh hadīths regarding its prohibition.
Our ashāb made hujja with the (1) hadīth of Anas, may Allah be pleased with him, from the Prophet, Allah’s Salutation and Peace upon him, that he said:{Those who forgot to pray or slept through the prayer time, their kaffāra (expiation) is to pray it when they recall it.} narrated by al-Bukhāri and Muslim. This is the phrasing of Muslim from (2) Ummu Salama, may Allah be pleased with her, that the Prophet, Allah’s Salutation and Peace upon him, {Prayed two raka’as after ‘Ásr. Then, when he turned away from it, he said: You asked regarding the two raka’as after ‘Ásr, the people of ‘Abd al-Qais has indeed came to me pertaining to the acceptance of Islam from their people, and they busied me from performing the two rak’aas after Zhuhr so these are the two raka’as I did after ‘Asr}. Narrated by al-Bukhāri and Muslim.
The response to the hadīths of its prohibition is that they are general, while this is specific. And the specific is given precedence over the general, whether it comes first or after. If it is said: there is no hujja with regard to the hadīths of Ummu Salama and ‘Āisha, because these continued prayers after ‘Ásr is from the khaśśāis of the Prophet, Allah’s Salutation and Peace upon him, then we say: In this matter there are two wajhs according to our ashāb as mentioned earlier. One of them is it is permissible to do this for anyone. But the aśah of the two wajh is that continuity is not permissible to other than the Prophet, Allah’s Salutation and Peace upon him. Thus, upon this, the proof from the act of the Prophet, Allah’s Salutation and Peace upon him is to perform qadha’ in the earliest time of the day. Allah knows best.

Connecting between the Two Hadiths

They are the hadīth of prohibition from praying after Śubh, ‘Ásr and others with the hadīth { when one of you enter the mosque, do not sit until you pray two raka’as }. Hence, pertaining to one entering the mosque during one of these periods, as we have previously mentioned, our maźhab is that it is sunna to pray tahiya of the mosque due to the hadīth pertaining to it. The response to the hadīths of prohibition is that the injunction to pray tahiya is a specific one and thus it follows the previously mentioned rule. If it is said: the prohibition is general for all prayers, and specific to some of the times while the hadīth of tahiya is general to all the times but specific to some of the prayers. So why not consider the specificity of the hadīth of prohibition, and not the hadīth of tahiya? We say: the specificity of the hadīth of prohibition includes the hadīths we mentioned earlier pertaining to the prayer of Śubh and ‘Asr and the ijmā’ we cited pertaining to the prayer of Jenāza. As for the hadīth of tahiya of the mosque, when considering its generality, there is no specificity mentioned about it. This is why the Prophet, Allah’s Salutation and Peace upon him, enjoined the one who enters the mosque on the day of Jum’ah during the khutba to pray the tahiya after he sat. If the tahiya is to be left at any time of the day, then this should be the time to leave it. This is because all prayers are avoided during this time except for the tahiya. Furthermore, the Prophet, Allah’s Salutation and Peace upon him spoke about it during his khutba, and after the one entering sat down. All of these are evidence of its generality.
From Wahb Bin Ajda’ from ‘Ali bin Abi Tālib, may Allah be pleased with him that the Prophet, Allah’s Salutation and Peace upon him said: {Do not pray after ‘Ásr except that you pray while the sun is murtafi’a (ascended high)} and in a narration naqiah (pure) narrated by Abu Daud and others with a hasan chain. Outwardly, it contradicts the śahīh hadiths with regard to the generality of prohibition at the time of the prayer of ‘Ásr until the setting of the sun. It also contradicts what is held by the maźhabs of the jumhūr of the scholars. The response is as mentioned previously.