Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates: A Bedouin entered the mosque while the Prophet Muhammad (peace be upon him) was present in the mosque. The Bedouin said: O Allah! Forgive me and Muhammad (peace be upon him), and do not forgive anyone else along with us. The Prophet (peace be upon him) said: You have made something vast into something narrow. Then the Bedouin moved to one side and began to urinate in a corner of the mosque. Later, when this Bedouin learned about Islamic teachings, he said: The Messenger of Allah (peace be upon him) had said to him: These mosques are for the remembrance of Allah and for performing prayers. Do not urinate in them. Then the Prophet (peace be upon him) called for a bucket of water and poured it over his urine.
Hadith Referenceصحیح ابن حبان / كتاب الطهارة / 1402
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيحسن صحيح - «صحيح أبي داود» (406).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده حسن من أجل محمد بن عمرو.