Sahih Muslim – Hadith No : 512

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 (may peace be upon him) 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 (may peace be upon him) and quietly moved out from under its (i. e. of the bedstead) legs.

Hadith In Arabic Text :

حدثنا عمرو الناقد، وأبو سعيد الأشج قالا حدثنا حفص بن غياث، ح قال وحدثنا عمر بن حفص بن غياث، – واللفظ له – حدثنا أبي، حدثنا الأعمش، حدثني إبراهيم، عن الأسود، عن عائشة، ‏.‏ قال الأعمش وحدثني مسلم، عن مسروق، عن عائشة، وذكر، عندها ما يقطع الصلاة الكلب والحمار والمرأة ‏.‏ فقالت عائشة قد شبهتمونا بالحمير والكلاب ‏.‏ والله لقد رأيت رسول الله صلى الله عليه وسلم يصلي وإني على السرير بينه وبين القبلة مضطجعة فتبدو لي الحاجة فأكره أن أجلس فأوذي رسول الله صلى الله عليه وسلم فأنسل من عند رجليه ‏.‏

Chapter : The Book of Prayers – كتاب الصلاة