"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).'" (Using translation from Ibn Mājah 616)
قَالَ رَسُولُ اللَّهِ ﷺ «إِذَا أُقِيمَتِ الصَّلَاةُ وَيَأْخُذُ أَحَدُكُمُ الْغَائِطُ فَلْيَبْدَأْ بِالْغَائِطِ»