"A Bedouin entered the mosque when the Messenger of Allah was sitting there, and (the man) said: 'O Allah, forgive me and Muhammed, and do not forgive anyone else with us.' The Messenger of Allah smiled and said: 'You have placed restrictions on something that is vast.' Then the Bedouin turned away, went to a corner of the mosque, spread his legs and began to urinate. After he had a better understanding, the Bedouin said: 'He got up and came to me, and may my father and mother be ransomed for him, he did not rebuke me nor revile me. He said: "This mosque is not for urinating in. Rather it is built for the remembrance of Allah and prayer.'" Then he called for a large vessel of water and poured it over the place where he had urinated." (Using translation from Ibn Mājah 529)
عَنْ أَبِي هُرَيْرَةَ دَخَلَ أَعْرَابِيٌّ الْمَسْجِدَ وَرَسُولُ اللهِ ﷺ جَالِسٌفَقَالَ اللهُمَّ اغْفِرْ لِي وَلِمُحَمَّدٍ وَلَا تَغْفِرْ لِأَحَدٍ مَعَنَا فَضَحِكَ رَسُولُ اللهِ ﷺ وَقَالَ لَقَدِ احْتَظَرْتَ وَاسِعًا ثُمَّ وَلَّى حَتَّى إِذَا كَانَ فِي نَاحِيَةِ الْمَسْجِدِ فَشَجَ يَبُولُ فَقَامَ إِلَيْهِ رَسُولُ اللهِ ﷺ فَقَالَ إِنَّمَا بُنِيَ هَذَا الْبَيْتُ لِذِكْرِ اللهِ وَالصَّلَاةِ وَإِنَّهُ لَا يُبَالُ فِيهِ ثُمَّ دَعَا بِسَجْلٍ مِنْ مَاءٍ فَأَفْرَغَهُ عَلَيْهِ قَالَ يَقُولُ الْأَعْرَابِيُّ بَعْدَ أَنْ فَقِهَ فَقَامَ النَّبِيُّ ﷺ إِلَيَّ بِأَبِي هُوَ وَأُمِّي فَلَمْ يَسُبَّ وَلَمْ يُؤَنِّبْ وَلَمْ يَضْرِبْ