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 Messenger of Allah ﷺ stood up and said to him, "This house was built only for the remembrance of Allah and for prayer. It is not a place to urinate in." Then he called for a bucket of water and poured it over the spot.The Arabi later said, after he had gained understanding, "The Prophet ﷺ, may my father and mother be sacrificed for him, came up to me, and he did not insult me, did not rebuke me, and did not strike me."
حدثنا يزيد أخبرنا محمد عن أبي سلمة
دخل أعرابي المسجد ورسول الله ﷺ جالس فقال اللهم اغفر لي ولمحمد ولا تغفر لأحد معنا فضحك رسول الله ﷺ وقال لقد احتظرت واسعا ثم ولى حتى إذا كان في ناحية المسجد فشج يبول فقام إليه رسول الله ﷺ فقال إنما بني هذا البيت لذكر الله والصلاة وإنه لا يبال فيه ثم دعا بسجل من ماء فأفرغه عليه قال يقول الأعرابي بعد أن فقه فقام النبي ﷺ إلي بأبي هو وأمي فلم يسب ولم يؤنب ولم يضرب
Its isnad is sahih, Bukhari related it in 1/65, in wudu, pouring water on urine, and Nasai in 1/48, in purification, leaving off setting a limit for water, and Ibn Majah in 1/176, number 529.