I prayed with Anas bin Malik over the funeral of a man, and he stood level with the man's head. Then they brought the funeral of a woman from Quraysh and said, "Abu Hamza, pray over her."He stood level with the middle of the bier.Ala bin Ziyad asked him, "Is this how you saw the Messenger of Allah ﷺ stand in relation to the woman, just as you stood, and in relation to the man, just as you stood?"He replied, "Yes."When he finished, he said, "Remember this."
صليت مع أنس بن مالك على جنازة رجل، فقام حيال رأسه، ثم جاءوا بجنازة امرأة من قريش فقالوا: يا أبا حمزة! صل عليها، فقام حيال وسط السرير، فقال له العلاء بن زياد: هكذا رأيت رسول الله ﷺ قام على الجنازة مقامك منها، ومن الرجل مقامك منه؟ قال: نعم، فلما فرغ قال: احفظوا.
Tirmidhi (1034) and Ibn Majah (1494) both narrated it through the route of Saeed bin Amir, from Hammam, from Abu Ghalib, who related it. Abu Dawud (3194) narrated it through another route from Abdul-Warith, from Nafi Abu Ghalib, who said, I was in the marketplace lane of Mirbad when a funeral passed by with a large crowd of people. They said, "This is the funeral of Abdullah bin Umayr." So I followed it, and I found a man wearing a thin cloak, riding on his mule, with a cloth on his head to shield him from the sun. I asked, "Who is this dignitary?" They said, "This is Anas bin Malik." When the bier was set down, Anas stood and performed the funeral prayer over it, and I was directly behind him with nothing between us. He stood by the head of the deceased, said the takbir four times, neither prolonging nor rushing it, then went to sit down. They said, "Abu Hamza, the Ansari woman!" So they brought her forward, with a green bier cover over her, and he stood by her hips and prayed over her in a manner similar to how he had prayed over the man. Then he sat down.Ala bin Ziyad said, and he related it as before, with an additional detail about his campaign with the Messenger of Allah ﷺ at Hunayn, and the story of a man's vow...Ahmad (12180) narrated it from Waki, who said, Hammam narrated to me, from Ghalib, this is how Waki said it, "Ghalib," though it is actually Abu Ghalib, from Anas, and he related the hadith as before.Tirmidhi said, "This hadith of Anas is a hasan hadith. More than one narrator has transmitted something similar from Hammam. Waki narrated this hadith from Hammam but erred in it, saying, 'from Ghalib, from Anas,' when the correct version is 'from Abu Ghalib.' This hadith was also narrated by Abdul-Warith bin Saeed and others from Abu Ghalib in a manner similar to Hammam's narration. They differed regarding the name of this Abu Ghalib. Some said his name is said to be Nafi, and others said Rafi. Some scholars have held this view, and it is the position of Ahmad and Ishaq." End of quote.I say, Abu Ghalib is the Basran tailor, client of the Bahili tribe. Hafiz said of him in Taqrib, "Trustworthy." As for the statement of Hafiz in Fath al-Bari (3/201), "Bukhari indicated that he considered daif what Abu Dawud and Tirmidhi narrated through the route of Abu Ghalib, from Anas bin Malik... there is no basis for weakening it."Shaykh bin Baz therefore responded to this, saying, "Its chain of transmission is sound, and it stands as clear evidence for distinguishing between the position taken for a man and a woman in the funeral prayer, and it proves that the sunnah is to stand at the head of the man and at the middle of the woman."