The scholars of Islam have differed regarding offering funeral prayer for a deceased after his burial. The preferable view is in favor of the permissibility of performing such prayer, particularly if no prayer was offered prior to the burial. In this case, offering funeral prayer would make up for a missed obligation, and it is also a kind of supplication, which is allowed at any time.
Dr. Ahmad Taha Rayyan, Professor of Comparative Jurisprudence at Al-Azhar University states: “The permissibility of offering funeral prayer over the grave is established in many Hadiths (Prophetic traditions). It is narrated on the authority of Abu Hurayrah that the Prophet, peace and blessings be upon him, asked about a woman who used to sweep the mosque, and people told him that she had died. He asked why they did not inform him, and it appeared as if they had given her little concern. Then, he said: “Show me her grave.” They led him to her grave and he offered her funeral prayer.
Al-Bukhari also reported that the Prophet, peace and blessings be upon him, offered funeral prayer over a grave of a young boy from al-Ansar (people of Madina) who had been buried at night without informing the Prophet, peace and blessings be upon him, of his death.
Imam al-Shafi’ views that the above Hadiths indicate the permissibility of offering funeral prayer for all buried Muslims, whether this prayer had been offered for them prior to the burial or not.
According to Imam Malik, it is not allowed to perform funeral prayer after burial, saying that such thing was confined to the Prophet, peace and blessings be upon him.
The preferable view is that of Imam al-Shafi`i, who maintains the permissibility of performing funeral prayer after burial. However, the scholars in favour of this view have differed concerning estimating a precise period of time during which this prayer can be performed.
Some of them are of the view that funeral prayer can be performed during a month starting from the day of burial. They based their opinion on the Hadith of Sa`id Bin al-Musayyab that Umm al-Sa`ad was buried in the absence of the Prophet, peace and blessings be upon him. When he came after a month, he offered funeral prayer for her.
Some others view that performing funeral prayer is permitted so long as the body has not decayed and become dust, because in this case, there would be no reason for offering this prayer. A third group go for offering funeral prayer at any time, particularly if no prayer has not been offered before burying the deceased.