The Messenger of Allah ﷺ forbade praying between graves.
نهي رسول الله ﷺ أن يصلى بين القبور.
No references are available.
Narrated by Ibn Hibban (2318, 2315, 1698), Abu Yaala (2888), and Bazzar in Kashf Astar (442), from Hafs bin Ghiyath, from Ashath, from Hasan, from Anas, and he mentioned it. In it is Hasan Basri, who is a mudallis and he narrated it using "an" without specifying direct hearing, but the narration of Ibn Hibban reassures the heart regarding him, because he said in the introduction to his Sahih (1/161), "If a report reaches me as sound from the narration of a mudallis without his clarifying that he heard it directly, I do not mind mentioning it without clarifying the hearing in his report, once its soundness has been established for me through another route."Moreover, he was not alone in narrating it, rather he was corroborated. The hadith has other chains that Bazzar mentioned, among them, through the route of Abdullah bin Ajlah, from Asim, from Anas, mentioning something similar, and among them, from Abu Muawiya, from Abu Sufyan, meaning Saadi, from Thumama, from Anas, mentioning something similar. These corroborations strengthen the narration of Hasan.On this subject there is also what was narrated from Ibn Umar, that the Prophet ﷺ forbade praying in seven places, at the dumping ground, the slaughterhouse, the graveyard, in the middle of the road, in the bathhouse, at the resting places of camels, and on top of the roof of the House of Allah.This was narrated by Tirmidhi (346) and Ibn Majah (746), both through the route of Abdullah bin Yazid Muqri, who said, narrated to us Yahya bin Ayub, from Zayd bin Jubayrah, from Dawud bin Husayn, from Nafi, from Ibn Umar, who mentioned it. Tirmidhi said, "Its isnad is not that strong, and Zayd bin Jubayrah has been criticized regarding his memory."I say, from this same route, Bayhaqi also recorded it (2/329) and said, "Zayd bin Jubayrah alone narrated it." This Zayd bin Jubayrah, Bukhari said of him, "His hadith is munkar." Abu Hatim said, "His hadith is daif, extremely munkar, his hadith is abandoned, his hadith is not to be written down." Saji said, "He narrated from Dawud bin Husayn an extremely munkar hadith," meaning this hadith.Then Tirmidhi said, "Layth bin Saad narrated this hadith from Abdullah bin Umar Umari, from Nafi, from Ibn Umar, from Umar, from the Prophet ﷺ, with something similar." He said, "The hadith of Dawud, from Nafi, from Ibn Umar, from the Prophet ﷺ is closer to being correct, and more sahih than the hadith of Layth bin Saad. Abdullah bin Umar Umari was declared daif by some scholars of hadith regarding his memory, among them Yahya bin Saeed Qattan." End of quote.I say, the hadith of Layth was narrated by Ibn Majah (747) from Ali bin Dawud and Muhammad bin Abu Husayn, who both said, narrated to us Abu Salih, who said, narrated to me Layth with it, and he said in it "the trodden path" instead of "the middle of the road," with the rest being the same.There are two flaws in this isnad. The first, Abdullah bin Salih, Abu Salih Juhani Misri, the scribe of Layth bin Saad, of whom Nasai said, "He is not trustworthy," and Hakim said, "His hadith is to be discarded." The second, Abdullah bin Umar Umari is very daif.So Tirmidhi's statement that the hadith of Dawud, from Nafi, from Ibn Umar, from the Prophet ﷺ, is closer to being correct and more sahih than the hadith of Layth bin Saad, and Allah knows best, is because in the hadith of Layth bin Saad there are two flaws, while in the hadith of Dawud there is only one flaw. In any case, the hadith through both routes is daif."The dumping ground" is the place where refuse and filth are thrown. "The slaughterhouse" is the place of slaughtering animals and disposing of their remains. "The middle of the road" is its highest part, and the middle of a house's courtyard is its open area.It is also reported from Ali that he was passing by Babylon while traveling, and the muezzin came to call him to the Asr prayer. When he emerged from it, he ordered the muezzin, and the call to prayer was given. When he finished, he said, "My beloved ﷺ forbade me from praying in the graveyard, and forbade me from praying in the land of Babylon, for it is cursed."This was narrated by Abu Dawud (490), who said, narrated to us Sulayman bin Dawud, who said, informed us Ibn Wahb, who said, narrated to me Ibn Lahia and Yahya bin Azhar, from Ammar bin Saad Muradi, from Abu Salih Ghifari, that Ali said, mentioning something similar. Khattabi said, "There is something to be discussed in the isnad of this hadith."I say, it contains a break in transmission, for Abu Salih Ghifari, whose name is Saeed bin Abdul-Rahman, his narration from Ali bin Abu Talib is mursal, as Ibn Yunus said, and he said, "I do not think he heard from him."Bayhaqi narrated it through the route of Abu Dawud, and he said, "This prohibition against praying in it, if established as coming from the Prophet, is not for a reason related to the validity of the prayer itself. So if one were to pray there, he would not need to repeat the prayer, rather it is..." (2/451). Then he mentioned the hadith of Ibn Umar, from the Prophet ﷺ, "Do not enter upon these people," meaning the people of Thamud, "unless you are weeping. If you are not weeping, then I fear that what befell them may befall you as well."