"Is this how you saw the Prophet ﷺ stand at a funeral, taking the same position you took for her and the same position you took for the man?"He replied, "Yes."When he finished, he said, "Remember this."
حدثنا عبد الله بن منير عن سعيد بن عامر عن همام عن أبي غالب قال صليت مع أنس بن مالك على جنازة رجل فقام حيال رأسه ثم جاءوا بجنازة امرأة من قريش فقالوا يا أبا حمزة صل عليها فقام حيال وسط السرير فقال له
هكذا رأيت النبي ﷺ قام على الجنازة مقامك منها ومن الرجل مقامك منه قال نعم فلما فرغ قال احفظوا
[Its isnad is hasan]. Ibn Majah also narrated it in the Book of Funerals, chapter on where the imam should stand when praying over the deceased, no. 1494, from the hadith of Saeed bin Amir, through this same route. There is also a report on this subject from Samura [to come at no. 1035].