Sahih Muslim 512 d
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا عَمْرٌو النَّاقِدُ، وَأَبُو سَعِيدٍ الأَشَجُّ قَالاَ حَدَّثَنَا حَفْصُ بْنُ غِيَاثٍ، ح قَالَ وَحَدَّثَنَا عُمَرُ بْنُ حَفْصِ بْنِ غِيَاثٍ، - وَاللَّفْظُ لَهُ - حَدَّثَنَا أَبِي، حَدَّثَنَا الأَعْمَشُ، حَدَّثَنِي إِبْرَاهِيمُ، عَنِ الأَسْوَدِ، عَنْ عَائِشَةَ، . قَالَ الأَعْمَشُ وَحَدَّثَنِي مُسْلِمٌ، عَنْ مَسْرُوقٍ، عَنْ عَائِشَةَ، وَذُكِرَ، عِنْدَهَا مَا يَقْطَعُ الصَّلاَةَ الْكَلْبُ وَالْحِمَارُ وَالْمَرْأَةُ . فَقَالَتْ عَائِشَةُ قَدْ شَبَّهْتُمُونَا بِالْحَمِيرِ وَالْكِلاَبِ . وَاللَّهِ لَقَدْ رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يُصَلِّي وَإِنِّي عَلَى السَّرِيرِ بَيْنَهُ وَبَيْنَ الْقِبْلَةِ مُضْطَجِعَةً فَتَبْدُو لِي الْحَاجَةُ فَأَكْرَهُ أَنْ أَجْلِسَ فَأُوذِيَ رَسُولَ اللَّهِ صلى الله عليه وسلم فَأَنْسَلُّ مِنْ عِنْدِ رِجْلَيْهِ .
Masruq reported:
It was mentioned before'A'isha that prayer is invalidated (in case of passing) of a dog, an ass and a woman (before the worshipper, when he is not screened). Upon this 'A'isha said: You likened us to the asses and the dogs. By Allah I saw the Messenger of Allah (ﷺ) saying prayer while I lay on the bedstead interposing between him and the Qibla. When I felt the need, I did not like to wit to front (of the Holy Prophet) and perturb the Messenger of Allah (ﷺ) and quietly moved out from under its (i.e. of the bedstead) legs.
Full reference and source
Sahih Muslim 512 d In-book : Book 4, Hadith 305 USC-MSA web (English) : Book 4, Hadith 1038 (deprecated)
View source on Sunnah.com (opens in a new tab)