Sunan Ibn Majah, Book 1, Hadith 350 (Ibn Majah 616)
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).'"