Sahih Muslim Book 2, Hadith Number 558.
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 b. Malik narrated that a desert Arab (Bedouin) stood in a corner of the mosque and urinated there. The people (the Companions of the Holy Prophet who were present there) shouted, but the Messenger of Allah (may peace be upon him) said: Leave him alone. When he had finished, the Messenger of Allah (may peace be upon him) ordered that a bucket (of water) should be brought and poured over it.