Abu Bakr entered upon the Messenger of Allah ﷺ at the moment he died, then he came out. It was said to him, "Has the Messenger of Allah ﷺ passed away?"He replied, "Yes."So they knew that it was as he had said.Then it was asked, "Shall the funeral prayer be performed over him, and how is it to be performed?"He said, "They shall come in groups, one group after another, and pray."So they knew that it was as he had said. Then they asked, "Shall he be buried, and where?"He said, "In the place where Allah took his soul, for Allah does not take a soul except in a blessed place."So they knew that it was as he had said.
دخل أبو بكر على رسول الله ﷺ لحين مات ثم خرج، فقيل له: توفي رسول الله ﷺ؟ فقال: نعم، فعلموا أنه كما قال، وقيل: ويصلى عليه، وكيف يصلى عليه؟ قال: يجيئون عصبا عصبا فيصلون، فعلموا أنه كما قال فقالوا: هل يدفن؟ وأين؟ فقال: حيث قبض الله روحه، فإنه لم يقبض الله روحه إلا في مكان طيب، علموا أنه كما قال.
Bayhaqi (4/30) narrated it via Yunus bin Bukayr, from Salama bin Nubayt, from his father Nubayt bin Shurayt Ashjai, from Salim bin Ubayd, who related it. Tirmidhi also related it in Shamail (379), as did Ibn Majah (1234), and Tabarani in Kabir (7/64), all of them through routes from Salama bin Kuhayl, in a long account that will come in its place, part of which has already passed in the book of prayer. Its isnad is sahih, as Busiri said in Zawaid bin Majah.Ibn Abbas said, "When prayer was performed over the Messenger of Allah ﷺ, the men were brought in and they prayed over him without an imam, in successive groups, until they finished. Then the women were brought in and they prayed over him. Then the children were brought in and they prayed over him. Then the slaves were brought in and they prayed over him in successive groups. No one led them in prayer over the Messenger of Allah ﷺ."Shafii said, "That was because of the magnitude of the matter of the Messenger of Allah ﷺ, may my father and mother be sacrificed for him, and their rivalry in not wanting any single person to take charge of leading the prayer over him, so they prayed over him time after time." Bayhaqi mentioned it.I say, the hadith of Ibn Abbas was narrated by Ibn Majah (1628) from Nasr bin Ali Jahdami, who said, Wahb bin Jareer informed us, who said, my father narrated to us, from Muhammad bin Ishaq, who said, Husayn bin Abdullah narrated to me, from Ikrima, from Ibn Abbas, in a long account, the text of which is as follows.When they wanted to dig a grave for the Messenger of Allah ﷺ, they sent for Abu Ubayda bin Jarrah, who used to dig trench graves like those of the people of Makkah, and they sent for Abu Talha, who was the one who used to dig graves for the people of Madinah, digging niche graves. So they sent two messengers to both of them, and said, "O Allah, choose for Your Messenger." They found Abu Talha, so he was brought, but Abu Ubayda was not found, so a niche grave was dug for the Messenger of Allah ﷺ.He said, when they finished preparing him on Tuesday, he was placed on his bed in his house. Then the people entered upon the Messenger of Allah ﷺ in successive groups, praying over him, until when they finished, the women were brought in, and when they finished, the children were brought in. No one led the people in prayer over the Messenger of Allah ﷺ.The Muslims disagreed about the place where he should be buried. Some said he should be buried in his mosque, and others said he should be buried with his companions. Abu Bakr said, "I heard the Messenger of Allah ﷺ say, 'No prophet dies except that he is buried where he died.'" He said, so they lifted the bedding of the Messenger of Allah ﷺ on which he had died, and dug his grave beneath it. He was then buried in the middle of the night of Wednesday. Ali bin Abu Talib, Fadl bin Abbas, his brother Quthum, and Shaqran, the freed slave of the Messenger of Allah ﷺ, went down into his grave. Aws bin Khawli, who was Abu Layla, said to Ali bin Abu Talib, "I adjure you by Allah and by our share in the Messenger of Allah ﷺ." Ali said to him, "Come down." Shaqran, his freed slave, took a cloak that the Messenger of Allah ﷺ used to wear, and buried it in the grave, saying, "By Allah, no one shall ever wear it after you." So it was buried with the Messenger of Allah ﷺ.This hadith has been narrated through many routes, as its full sourcing will come in the biography of the Prophet ﷺ. In summary, it is hasan, and the companions, may Allah's approval be upon them, acted upon it, and no one opposed it, so it became like a consensus.As for the people's praying over the Prophet ﷺ individually, this is agreed upon among the biographers and the transmitters, who do not differ over it, as Hafiz bin Abdul-Barr said. See Tamhid (24/394–402). It has been said that those who prayed over the Prophet ﷺ numbered thirty thousand.As for what has been narrated from Ibn Masud regarding the Prophet's ﷺ instruction that the men of his household should wash him, and that he said, "Shroud me in these garments of mine, or in Yemeni cloth, or in white cloth of Egypt," and that when they had shrouded him they should place him at the edge of his grave, then withdraw from him until the angels pray over him, then the men of his household should come in and pray over him, then the people after them individually, the hadith in full will come in its place. Bayhaqi and Bazzar narrated it from the hadith of Murra, from Ibn Masud. Hafiz bin Kathir said in his Tarikh (5/265), "There is doubt about its soundness."The jurisprudence of this chapter, scholars have used the companions' praying over the Prophet ﷺ in successive groups and individually as evidence that the obligation is fulfilled even if people pray over a funeral individually, based on the companions' consensus on that. However, the sunnah is that it be prayed in congregation, because of the Prophet's ﷺ constant practice of it throughout his life, and that of the companions after him, and the Muslims.