وعن أنس بن مالك قال: حاء أعرابي فبال فى طائفة المسجه فزجره الناس، فنهاهم النبى لا فلما قضى بوله أمر النبى الله بذنوب من ماء فأهريق عليه
Anas ibn Malik (may Allah be pleased with him) narrates that he said: A Bedouin came and urinated in a corner of the mosque. The people scolded him, but the Prophet ﷺ forbade them. When he had finished urinating, the Prophet ﷺ ordered a bucket of water to be brought, and it was poured over it.
This is the wording in the narration of al-Bukhari, and it is agreed upon (muttafaq alayh).
Research and takhrij: Bukhari: 221 Muslim: 285, 284
Benefits:
➊ Urine is unanimously agreed to be impure, and the place where it falls is to be purified with water.
➋ It is not permissible to stop someone from urinating while he is urinating; this causes two harms.
◈ There is the danger of harming the kidney or the bladder.
◈ Urine gets onto his clothes, and in the urgency of the moment there is no time to clean up.
➌ The respect due to the mosque is established. One should avoid throwing filth into the mosque, and if an ignorant person foolishly urinates in it, he should be treated with kindness.
➍ Preventing an action that looks correct but in reality is causing harm to another simple-natured person is a sign of wisdom. Just as he ﷺ stopped the Companions from scolding the man, although the action of the Companions looked correct, there was harm to the man in it.
➎ Until the urination is complete, he should not be called or troubled. Urination should be done hidden, separated, and having gone far away.