nor do we know of anyone who has said that it is legislated for a person to offer the funeral prayer at the grave of the Prophet, may Allah’s peace and blessings be upon him, or at the graves of the Companions. Rather, one should stand there and supplicate.
His statement, “and for an absent deceased,” is unrestricted and thus includes every absent deceased: male or female, noble or lowly, near relative or distant; one may offer the funeral prayer for every absent deceased.
The scholars have differed concerning this issue, holding three views:
The first view is that the funeral prayer may be offered for every absent deceased, even if thousands of people have already prayed over him.
Based on this view, some scholars adopted a practice which no one doubts is a religious innovation. They said: “When you wish to sleep, offer the funeral prayer for every Muslim who has died during that day and night, and you will receive an immense reward. Perhaps thousands died that night, and you will receive the reward of thousands of funeral prayers.”
But this view is undoubtedly a religious innovation, for the Messenger, may Allah’s peace and blessings be upon him—the person most knowledgeable of the Sacred Law, most merciful towards creation, and most eager to benefit people—did not do this. Nor did his Rightly Guided Caliphs do it, and it is not known to have been done by any of the Companions, may Allah be pleased with them.
The second view is that the funeral prayer may be offered for an absent deceased if he was of benefit to the Muslims—that is, if he brought them benefit—such as a scholar who benefited people through his knowledge, a merchant who benefited them through his wealth, or a fighter who benefited them through his striving, and the like. In such cases, the funeral prayer may be offered for him in gratitude and in recognition of his kindness, and to encourage others to do likewise.