Ayesha reported,

When Saad bin Abu Waqqas died, the wives of the Prophet ﷺ sent word asking that his bier be brought through the mosque so that they could pray over him. This was done, and the bier was placed near their chambers so they could pray over it. It was then taken out through the Gate of Funerals, which led to the benches.Word reached them that people had criticized this, saying that funerals were not to be brought into the mosque. When this reached Ayesha, she said, "How quick people are to criticize what they have no knowledge of! They criticize us for having a bier brought through the mosque, yet the Messenger of Allah ﷺ prayed over Suhayl bin Bayda only inside the mosque."

Muslim 2253

Sahih

و حدثني محمد بن حاتم حدثنا بهز حدثنا وهيب حدثنا موسى بن عقبة عن عبد الواحد عن عباد بن عبد الله بن الزبير يحدث

عن عائشة

أنها لما توفي سعد بن أبي وقاص أرسل أزواج النبي ﷺ أن يمروا بجنازته في المسجد فيصلين عليه ففعلوا فوقف به على حجرهن يصلين عليه أخرج به من باب الجنائز الذي كان إلى المقاعد فبلغهن أن الناس عابوا ذلك وقالوا ما كانت الجنائز يدخل بها المسجد فبلغ ذلك عائشة فقالت ما أسرع الناس إلى أن يعيبوا ما لا علم لهم به عابوا علينا أن يمر بجنازة في المسجد وما صلى رسول الله ﷺ على سهيل بن بيضاء إلا في جوف المسجد

مسلم 2253صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Funerals
Chapter
Prayer over the deceased in the masjid
Numbering
Darussalam 2253
Muslim 2253