The Messenger of Allah ﷺ saw me leaning on a grave and said, "Do not harm the occupant of this grave," or "Do not harm him."
رآني رسول الله ﷺ متكئا على قبر، فقال: لا تؤذ صاحب هذا القبر أو لا تؤذه.
Imam Ahmad narrated it in his Musnad (39/476, no. 39/000, Hadiths appended from the Musnad of the Ansar) from Ali bin Abdullah, who said Ibn Wahb told us, who said Amr bin Harith informed me, from Bakr bin Sawada al-Judhami, from Ziyad bin Nuaym al-Hadrami, from Amr bin Hazm, who narrated it as already related above.Its chain of transmission is sahih. Amr bin Hazm is al-Khazraji al-Ansari, who was present at the Trench and in the campaigns that followed it.Ziyad bin Nuaym is Ziyad bin Rabia bin Nuaym, with the nun vowelled with a damma, al-Hadrami, and he is sometimes attributed to his grandfather.Nasai narrated it (2045) through Nadr bin Abdullah al-Sulami, from Amr bin Hazm, as a marfu hadith, "Do not sit on graves."Nadr bin Abdullah al-Sulami, who is also said to be Abdullah bin Nadr al-Sulami, is majhul.The hadiths of this chapter provide evidence for the prohibition of sitting on a Muslim's grave and treading on it, and this is the view held by the majority of scholars.Malik, may Allah have mercy on him, said in the Muwatta (1/233), "It has reached me that Ali bin Abu Talib used to rest his head on graves and recline on them." Malik said, "The prohibition against sitting on graves, as we see it, concerns using them as a place to relieve oneself," meaning a person intending to relieve himself.The same has also been reported from Abu Hanifa. They cited as evidence the hadith of Zayd bin Thabit, as mentioned earlier. But this interpretation is refuted by the hadith of Uqba bin Amir, which places relieving oneself among the graves on the same footing as doing so in the middle of the marketplace, meaning that just as one must feel shame before the living, one must feel shame before the dead, and so should not relieve himself among the graves.