"I heard the Messenger of Allah ﷺ say: 'If any one of you feels the need to defecate, let him do that first, before he prays."' (Using translation from Nasāʾī 852)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ «إِذَا وَجَدَ أَحَدُكُمُ الْغَائِطَ فَلْيَبْدَأْ بِهِ قَبْلَ الصَّلَاةِ»