It was narrated that 'Abdullah bin Arqam said: The Messenger of Allah said: 'If anyone of you needs to defecate and the immediate call to prayer (Iqamah) is given, let him start with (relieving himself).'
It was narrated from Abu Umamah that: The Messenger of Allah forbade a man to perform prayer when he was suppressing (the urge to urinate or defecate
It was narrated that Abu Hurairah said: The Messenger of Allah said, 'No one of you should stand to pray when he feels some discomfort (because of needing to urinate or defecate).'
It was narrated from Thawban that: The Messenger of Allah said: No one among the Muslims should stand to pray when he is suppressing (the need to urinate or defecate), until he has to relieve himself.