إذا أُقِيمَتِ الصلاةُ وأراد الرَّجُلُ الخَلاَءَ فَلْيَبْدَأ بالخَلاَءِ
(مالك الشافعي حب ت ن ه حب ك هق) عن عبدالله بن أرقم.
It is reported that the Messenger of Allah (peace and blessings of Allaah be upon him) said:
“When standing for the prayer and one of you finds that he has to relieve himself then let him relieve himself first[1].”
This hadith was narrated by Malik 378, al-Shafi’i, Ahmad 3/483, at-Tirmidhi 142, an-Nasai 1/110, Ibn Majah 616, Ibn Hibban 2071, Ibn Khuzaimah 1561, al-Bayhaqi 3/72, al- Hakim 1/273, who said: “A reliable hadith, corresponding to the conditions of al-Bukhari and Muslim,” and Az-Dhahabi agreed with him, related by ‘Abdullah ibn Arqam رضي الله عنه.
Sheikh al-Albani called the hadith authentic. See Saheeh al-jami ‘as-sagyir 373.
[1] That is, let him first go to the toilet and relieve himself, so that it does not interfere with him during prayer.