He set out for Hajj or Umrah with people accompanying him, and he was leading them in prayer. One day, he announced the iqamah for the dawn prayer and then said, "Let one of you step forward to lead," and he went off to relieve himself. He explained, "I heard the Messenger of Allah ﷺ say, 'When one of you needs to relieve himself and the prayer has been called, let him begin with relieving himself.'"
حدثنا أحمد بن يونس حدثنا زهير حدثنا هشام بن عروة عن أبيه
أنه خرج حاجا أو معتمرا ومعه الناس وهو يؤمهم فلما كان ذات يوم أقام الصلاة صلاة الصبح ثم قال ليتقدم أحدكم وذهب إلى الخلاء فإني سمعت رسول الله ﷺ يقول إذا أراد أحدكم أن يذهب الخلاء وقامت الصلاة فليبدأ بالخلاء
[Sahih] Reported by Tirmidhi, Tahara (Purification), the chapter on what has been said about when the prayer is called, no. 142, Nasai, no. 853, and Ibn Majah, no. 616, from the hadith of Hisham bin Urwa, through this same chain. Tirmidhi said, hasan sahih. Ibn Khuzayma graded it sahih, no. 932, 1652, as did Ibn Hibban (Mawarid), no. 194, and Hakim, 1/168, and Dhahabi agreed with him.