Ruling on praying behind someone who promotes democracy and secularism
Question

 
There is a hadith in Saheeh Muslim according to which the Prophet (blessings and peace of Allah be upon him) said: “After me there will be leaders who will delay the prayer from its proper time. Offer the prayer on time, then make your prayer with them naafil.”
Is what is meant by this hadith the leaders of the Muslims or of the disbelievers? Or does it refer to the imams of mosques and no one else?
Is it possible to apply this hadith to our current situation, because in some countries, including ours (the Maldives), Jumu‘ah prayer is delayed until a certain time?
Is it permissible to pray behind imams who have been appointed by governments and who do not preach the teachings of pure Islam; rather instead of that they promote democracy and secularism?
Are we obliged to find out details of whether or not the imam whom we follow in the prayer is one of those who practice democracy?
Praise be to Allah.Firstly: 
Muslim narrated in his Saheeh (648) from Abu Dharr (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said to me: “What will you do when there are appointed over you leaders who delay the prayer from its proper time or kill it (i.e., delay it so much that it is like something lifeless)?” I said: What do you command me to do? He said: “Offer the prayer on time, then if you are with them when they pray, pray with them, and that will be a naafil prayer for you.” 
According to another version also narrated by Muslim from Abu Dharr, he said: The Messenger of Allah (blessings and peace of Allah be upon him) said to me: “O Abu Dharr, after me there will be leaders who will kill the prayer. Pray on time, for if you pray on time, that (i.e., your prayer with them) will be naafil, and you will have done your prayer properly.” 
So the Prophet (blessings and peace of Allah be upon him) foretold that after him there would be leaders who would delay the prayer from its preferred time and pray it towards the end of its time. 
Al-Mannaawi said: This is one of the signs of Prophethood, namely foretelling something before it came to pass. And something worse than that happened at the time of al-Hajjaaj and other times.
End quote from Fayd al-Qadeer (4/100). 
It says in Mirqaat al-Mafaateeh Sharh Mishkaat al-Masaabeeh (2/531): That happened at the time of the Umayyads, and that was a miracle (i.e., the foretelling of it). 
The scholars differed as to what is meant by these leaders’ delaying of the prayer: is it delaying it until the preferred time for it has ended, then praying it towards the end of its time, as an-Nawawi believed was more likely to be the case? Or does it mean delaying it until the time for it has ended altogether, as Ibn Taymiyah (may Allah have mercy on him) believed was more likely to be the case? 
An-Nawawi (may Allah have mercy on him) said in his commentary on this hadith: What is meant by “killing” the prayer is delaying it and making it like the deceased when his soul has departed. What is meant by delaying its proper time is delaying it from its preferred time, not delaying it until the time for it has ended altogether. What is reported from the earlier and later leaders is in fact that they delayed it from its preferred time, and none of them delayed it until the time for it had ended altogether. Hence we must interpret these reports on the basis of what really happened.
End quote from Sharh an-Nawawi ‘ala Muslim, 5/147 
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: With regard to the leaders who delayed the prayer from its proper time, and the Prophet’s prohibition on fighting them, if we understand that they used to delay the prayer and pray towards the end of its time, then there is no problem. But if it is said – which is the correct view – that they used to miss it, so the Prophet (blessings and peace of Allah be upon him) instructed the ummah to pray on time, and he said “Make your prayer with them naafil,” and he forbade them to fight the leaders and rulers if they behaved in a selfish manner and wronged the people and transgressed against them.
End quote from Majmoo‘ al-Fatawa, 22/61. 
In Mirqaat al-Mafaateeh Sharh Mishkaat al-Masaabeeh (2/308) it says: The apparent meaning of the hadith is delaying the prayer until the time for it has ended altogether. This is how an-Nasaa’i interpreted it. 
It is narrated in a saheeh report that al-Hajjaaj and his governor al-Waleed and others used to delay the prayer from its proper time, so this hadith should be interpreted in accordance with what really happened. 
Al-Haafiz said in Fath al-Baari (2/14): It is narrated in a saheeh report that al-Hajjaaj and his governor al-Waleed and others used to delay the prayer from its proper time, and the reports to that effect are well known. End quote. 
Secondly: 
What is meant by the leaders in this hadith are the leaders of the Muslims – i.e., their rulers – such as al-Hajjaaj ibn Yoosuf, al-Waleed ibn ‘Uqbah, and others. 
It says in Fath al-Baari by Ibn Rajab (4/183): The Sahaabah used to enjoin that and do it, when the Umayyads began to delay this prayer from its proper time, as did the leaders of the Taabi‘een and the leading scholars who came after them. … ash-Shaafa‘i narrated with his isnaad from Ibn ‘Umar that he objected to al-Hajjaaj offering Fajr prayer when it had become light, yet he prayed with him on that day. 
An-Nakha‘i said: Ibn Mas‘ood used to pray with the leaders at the time of ‘Uthmaan, although they delayed the prayer somewhat, and he thought that that was their responsibility. 
Rather he used to do that during the days of the governorship of al-Waleed ibn ‘Uqbah over al-Kufah at the time of ‘Uthmaan; he sometimes used to delay the prayer from the beginning of its time. End quote. 
This action on the part of these leaders is regarded as coming under the heading of evil doing (fisq), because delaying the prayer from its preferred time without an excuse is not permissible. 
Al-Maawardi (may Allah have mercy on him) said: Whoever prays behind an evildoer does not have to repeat his prayer and his prayer is valid, so long as he is still within the pale of Islam. The Prophet (blessings and peace of Allah be upon him) said: “After me there will be leaders who will delay the prayer from its proper time. Offer the prayer on time, then make your prayer with them Sunnah.” Because the hadith made it permissible to pray behind such a person although the one who delays the prayer deliberately is an evildoer, this indicates that his leading of the prayer is valid and that it is permissible to pray behind him.
End quote from al-Haawi al-Kabeer, 2/353 
Shaykh al-Islam Ibn Taymiyah said: Hence some of the companions of Ahmad and others stated that a naafil prayer may be offered behind an evildoer, because the Prophet (blessings and peace of Allah be upon him) enjoined praying behind the leaders who delayed the prayer until the time for it had ended, and these leaders are evildoers. So he enjoined doing it behind them as a naafil prayer. What is meant is that evildoing that consists of missing the prayer is something that is known to the fuqaha’.
End quote from al-Fatawa al-Kubra, 2/39 
But this evildoing does not prevent us from following them and praying behind them, so long as they do not do anything that nullifies their Islam, because not praying behind the leaders – even if they are evildoers – is something that provokes turmoil and creates division among the Muslims. 
We have previously discussed in detail the ruling on praying behind an evildoer. Please see fatwa no. 47884 
Thirdly: 
With regard to the time for Jumu‘ah, it is the same as the time for Zuhr according to the majority of scholars of the earlier and later generations. This has been discussed previously in the answer to question no. 114859 
But if there is a need or interest which dictates delaying it, there is nothing wrong with that, such as if people are at work and cannot go to pray Jumu‘ah at the beginning of its time, so long as the prayer can be completed before the time for ‘Asr begins. This has been discussed in fatwa no. 145262
Based on that, if the imam delays Jumu‘ah prayer in such a way that its time will not end (before the prayer is completed), then you have to wait for him, because Jumu‘ah cannot be done without the imam, khutbah and congregation. 
Fourthly: 
With regard to praying behind one who promotes democracy and secularism: 
If they are calling for the abolition of sharee‘ah, and not letting the laws of Allah rule the lives of the Muslims, and for the separation of religion from public lives, then we should not pray behind such a person. 
But if what is meant is that he promotes elections and the use of the ballot box, then the ruling on that is subject to further discussion, but we should not refrain from praying behind him. 
Moreover the basic principle is that we may pray behind anyone who outwardly appears to be Muslim, without examining how he is. Shaykh al-Islam Ibn Taymiyah was asked about praying behind the Maraaziqah and about their innovations. 
He replied: It is permissible for a man to offer the five daily prayers, Jumu‘ah and other prayers behind a man about whom he does not know of any innovation or evildoing, according to the consensus of the four imams and other leading scholars of the Muslims. It is not a condition of following an imam in prayer that the person praying behind him should know what his imam believes, he should not test him and say: What do you believe? Rather he should pray behind someone about whom not much is known.
End quote from Majmoo‘ al-Fatawa, 23/351 
And Allah knows best.