An Arabi entered the mosque while the Messenger of Allah ﷺ was sitting, and he said, "O Allah, forgive me and Muhammad, and do not forgive anyone else along with us."The Messenger of Allah ﷺ laughed and said, "You have confined something vast."Then the man turned away, and when he reached a corner of the mosque, he spread his legs and began to urinate.The Arabi later said, after he had gained understanding, "He came to me, may my father and mother be sacrificed for him, and he neither rebuked me nor insulted me. He simply said, 'This mosque is not a place for urinating. It was built only for the remembrance of Allah and for prayer.' Then he called for a bucket of water and poured it over my urine."
حدثنا أبو بكر بن أبي شيبة حدثنا علي بن مسهر عن محمد بن عمرو عن أبي سلمة
دخل أعرابي المسجد ورسول الله ﷺ جالس فقال اللهم اغفر لي ولمحمد ولا تغفر لأحد معنا فضحك رسول الله ﷺ وقال لقد احتظرت واسعا ثم ولى حتى إذا كان في ناحية المسجد فشج يبول فقال الأعرابي بعد أن فقه فقام إلي بأبي وأمي فلم يؤنب ولم يسب فقال إن هذا المسجد لا يبال فيه وإنما بني لذكر الله وللصلاة ثم أمر بسجل من ماء فأفرغ على بوله
[Its isnad is hasan] Ahmad narrated it: 2/503, from the hadith of Muhammad bin Amr, and its original form is found in Bukhari (6010).