Anas bin Malik reported,

The Messenger of Allah ﷺ was sitting in the mosque with his companions when an Arabi came in and began urinating in the mosque.His companions exclaimed, "Stop! Stop!"But the Messenger of Allah ﷺ said, "Do not interrupt him. Leave him be."Then he called the man over and said to him, "These mosques are not suitable for any kind of filth, urine, or waste," or as the Messenger of Allah ﷺ said. "They are only for the recitation of the Quran, the remembrance of Allah, and prayer."Then the Messenger of Allah ﷺ said to one of the people present, "Get up and bring us a bucket of water and pour it over the spot." So the man brought a bucket of water and poured it over the area.

Ahmad 12984

Sahih

حدثنا بهز حدثنا عكرمة بن عمار حدثنا إسحاق بن عبد الله بن أبي طلحة الأنصاري

عن عمه أنس بن مالك قال

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

أحمد 12984صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 12984
Ahmad 12984