Ayesha reported,

The Messenger of Allah ﷺ came and found that the doors of his companions' houses opened directly into the mosque. He said, "Turn these houses away from the mosque."Then the Prophet ﷺ went inside, and the people did nothing, hoping that some concession would be revealed concerning them. He came out to them again and said, "Turn these houses away from the mosque, for I do not permit the mosque to a menstruating woman or to anyone in a state of major ritual impurity."

Abu Dawud 232

Hasan

حدثنا مسدد حدثنا عبد الواحد بن زياد حدثنا الأفلت بن خليفة قال حدثتني جسرة بنت دجاجة قالت سمعت

عائشة رضي الله عنها تقول

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

أبو داود 232حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Purification
Chapter
A junub entering the masjid
Numbering
Darussalam 232
Abu Dawud 232