There is nothing wrong with praying for forgiveness for the Muslims, men and women, in general terms. There is evidence to the effect that it is permissible, such as the following:
The verse in which Allah, may He be exalted, says (interpretation of the meaning):
“So know (O Muhammad SAW) that La ilaha ill-Allah (none has the right to be worshipped but Allah), and ask forgiveness for your sin, and also for (the sin of) believing men and believing women”
It was narrated from ‘Aasim al-Ahwal that ‘Abdullah ibn Sarjis said: I saw the Prophet (blessings and peace of Allah be upon him) and I ate bread and meat with him – or he said: thareed. He (the narrator) said: I said to him: Did the Prophet (blessings and peace of Allah be upon him) pray for forgiveness for you? He said: Yes, and for you. Then he recited this verse: “and ask forgiveness for your sin, and also for (the sin of) believing men and believing women” [Muhammad 47:19].
Narrated by Muslim, 2346.
There are several opinions concerning the tasfeer of the phrase “and ask forgiveness for your sin”. One of these opinions is that this shows that it is obligatory to pay for forgiveness for all the Muslims.
Al-Qurtubi (may Allah have mercy on him) said:
It was said that this is addressed to him (the Prophet (blessings and peace of Allah be upon him)), but is meant for the ummah. According to this opinion, this verse obliges the individual to pray for forgiveness for all of the Muslims.
Tafseer al-Qurtubi, 16/242
It was narrated that Ibn Jurayj said: I said to ‘Ata’: Should I pray for forgiveness for the believing men and women? He said: Yes. The Prophet (blessings and peace of Allah be upon him) was commanded to do that, so that is obligatory on all the people. Allah said to His Prophet (blessings and peace of Allah be upon him): “and ask forgiveness for your sin, and also for (the sin of) believing men and believing women” [Muhammad 47:19]. I said: Do you say that supplication in the obligatory prayer? He said: No. I said: With whom do you start, with yourself or with the believers? He said: With myself, as Allah says: “and ask forgiveness for your sin, and also for (the sin of) believing men and believing women” [Muhammad 47:19].
It was narrated that Abu Hurayrah said: The Messenger of Allah (blessings and peace of Allah be upon him) offered the funeral prayer and said: “O Allah, forgive our living and our dead, our young ones and our old ones, our males and our females, those of us who are present and those who are absent. O Allah, whomever You keep alive, keep him alive with faith and whomever you cause to die, cause him to die in Islam. Do not deprive us of the reward and do not cause us to go astray after this.”
Narrated by at-Tirmidhi, 1024; Abu Dawood, 3201; an-Nasaa’i, 1986.
Ibn ‘Allaan as-Siddeeqi (may Allah have mercy on him) said:
“O Allah, forgive our living and our dead” means all of our living ones and dead ones, all the Muslims.
Daleel al-Faaliheen li Turuq Riyadh as-Saaliheen, 6/240
This is the action of the angels (peace be upon them), as Allah says concerning them (interpretation of the meaning):
“and the angels glorify the praises of their Lord, and ask for forgiveness for those on the earth”
It is the action of the Prophets, the Sahaabah, the Taabi‘een and all the scholars of the earlier and later times.
Nooh (peace be upon him) said (interpretation of the meaning): “My Lord! Forgive me, and my parents, and him who enters my home as a believer, and all the believing men and women” [Nooh 71:28].
Ibraaheem (peace be upon him) said (interpretation of the meaning): “Our Lord! Forgive me and my parents, and (all) the believers on the Day when the reckoning will be established” [Ibraaheem 14:41].
It is what ‘Umar ibn al-Khattaab (may Allah be pleased with him) did:
‘Abd ar-Razzaaq narrated in al-Musannaf (3/111) that Ibn Jurayj said: ‘Ata’ told me that he heard ‘Ubayd ibn ‘Umayr narrate from ‘Umar ibn al-Khattaab concerning Qunoot that he used to say: “O Allah, forgive the believing men and women and the Muslim men and women, reconcile between their hearts and set their affairs straight between them…”
Narrated by al-Bayhaqi in as-Sunan al-Kubra (2/210); he said: (It is) saheeh mawsool.
Tuhfat al-Muhtaaj ila adillat al-Minhaaj, 1/410
It was the last instructions of Ibn ‘Abbaas (may Allah be pleased with him):
In Fadl as-Salaah ‘ala an-Nabiy by Ismaa‘eel al-Qaadi (p. 63) it says in a report that was classed as saheeh by Shaykh al-Albaani:
It was narrated from Ibn ‘Abbaas that he said: Do not send blessings upon anyone except upon the Prophet (blessings and peace of Allah be upon him); however, one should offer supplication (du‘aa’) for forgiveness for the Muslims, male and female.
It is what is said by all the believers, as Allah tells us about them in the verse (interpretation of the meaning):
“And those who came after them say: ‘Our Lord! Forgive us and our brethren who have preceded us in Faith, and put not in our hearts any hatred against those who have believed. Our Lord! You are indeed full of kindness, Most Merciful’”
In the answer to question no. 104460 there is a statement that this du‘aa’ is permissible – in fact it is encouraged. This was stated by Shaykh al-Islam Ibn Taymiyah and his student Ibn al-Qayyim. In the same answer several da‘eef marfoo‘ hadeeths on this topic have been quoted.
With regard to the opinion of those who object to this supplication on the grounds that Allah, may He be exalted, has decreed that there will not be forgiveness for all of the Muslims and that there is no doubt that some of them will enter the Fire, this is an objection that is not valid, because it is confusing the divine will and decree (qadr)) with the laws prescribed by Allah (shar‘). According to the divinely prescribed laws, we are commanded – or encouraged– to pray for forgiveness for all of the Muslims. That does not contradict that which has nothing to do with us of what Allah, may He be exalted, has decreed for some of the Muslims. One indication of that is found in the fact that the Prophet (blessings and peace of Allah be upon him) taught us du‘aa’s (supplications) to ask for forgiveness and he instructed the Muslims to recite them and say them. We know that it will not be accepted from some of those who say it. What we have mentioned above of evidence also confirms that those who say that this du‘aa’ is not right are mistaken, and it confirms that praying for forgiveness for all the Muslims, male and female, is something valid. The earliest we have come across of those who objected to this du‘aa’ was Abu’l-‘Abbaas al-Qarraafi (d. 684), who regarded offering supplication for that as something haraam! He said in al-Furooq ma‘a Hawaashihi (4/463):
“The fifth category of haraam things that do not constitute kufr is when the one who is offering supplication asks Allah for something contrary to what aahaad reports state going to happen. Why I mention “aahaad reports”, as opposed to mutawaatir reports, is because asking Allah for something not to happen in that case (i.e., when there are mutawaatir reports that state it will happen) is akin to kufr, as stated above. There follow some examples of that:
When he says “O Allah, forgive the Muslims all their sins,” although the saheeh hadeeths indicate that a group of the Muslims will inevitably enter Hell and be brought forth from it, with or without intercession. Their entering Hell will only be because of their sins. If all of the Muslims were forgiven all of their sins, no one would enter Hell. So this supplication implies rejection of those saheeh hadeeths! So it (this du‘aa’) is an act of disobedience, but it is not kufr (disbelief) because you are rejecting aahaad reports, and labelling something an act of kufr only applies to denying something that is well established in Islam or known from mutawaatir reports.
With regard to the angels praying for forgiveness for the believer by saying “so forgive those who repent” [Ghaafir 40:7] and “and [they] ask for forgiveness for those on the earth”[ash-Shoora 42:5], these words are not general in meaning, and do not apply to all people. Even if we were to assume that they are general in meaning, then we should understand them as meaning that what they meant was that it was exclusively for some people (and not for all).
Al-Furooq ma‘a Hawaamishihi, 4/463-465
Abu’l-Qaasim ibn al-Shaat al-Maaliki (may Allah have mercy on him – d. 723 AH) refuted this argument by saying, as it says in Haamish al-Furooq al-Musamma Idraar ash-Shurooq (4/488):
What he said about these and similar du‘aa’s constituting sin is a mere claim. Why should it be that one should only offer supplication for that which is possible to happen? I do not know of any proof or evidence for that.
Why is it not possible that Allah should enjoin people to ask for forgiveness for the sins of every believer, even though He has decreed that some of them will not be forgiven?
Moreover, what he said about these two verses –“so forgive those who repent” [Ghaafir 40:7] and “and [they] ask for forgiveness for those on the earth”[ash-Shoora 42:5] – not being general in meaning is a grievous mistake.
To sum up, the argument of this man (al-Qarraafi) is far-fetched, his claim has no proof and there is no need for it; he was confused and mistaken.
Shaykh ‘Abd al-Kareem al-Khudayr (may Allah preserve him) was asked:
What do you think of the view that du‘aa’ against the kaafirs is a kind of transgression because Allah knew that they would exist until the Day of Resurrection?
The Muslim is required to adhere to the teachings of Islam. With regard to the divine will and decree, it has nothing to do with him. One may say: Why do you pray for all of the Muslims when Allah knows that some of them will die whilst committing major sin? Yes, there are some scholars who say that this is not allowed and that it is not permissible to pray for all of the Muslims. There are some who disallow praying for all of the Muslims because according to Allah’s knowledge, there are some who will die whilst persisting in major sin, and this supplication is contrary to the divine will and decree. So based on that (flawed argument), you should not pray for yourself, because you do not know how your life will end! And you should not pray for your child, because Allah knows best how he will be! Rather we say: you are commanded to offer supplication, and this what Allah has prescribed; as for the divine will and decree, it belongs to Allah and has nothing to do with you.
Sharh al-Muwatta’, Kitaab al-Janaa’iz, Baab an-Nahy ‘an al-Buka’ ‘ala al-Mayyit.
And Allah knows best.