حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ عَبْدِ اللَّهِ بْنِ أَرْقَمَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏"‏ إِذَا أَرَادَ أَحَدُكُمُ الْغَائِطَ وَأُقِيمَتِ الصَّلاَةُ فَلْيَبْدَأْ بِهِ ‏"‏ ‏.‏
Translation
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."