Sahih Muslim Book 2, Hadith Number 557.

Chapter : It is obligatory to cleanse the mosque when there are impurities in it and the earth becomes clean of impurities with the help of water without scraping (the part of it).

Anas reported: A Bedouin urinated in the mosque. Some of the persons stood up (to reprimand him or to check him from doing so), but the Messenger of Allah (may peace be upon him) said: Leave him alone; don’t interrupt him. He (the narrator) said: And when he had finished, he called for a bucket of water and poured it over.