Sunan Abi Dawud 617
Narrated Abdullah ibn Amr ibn al-'As:
The Prophet (ﷺ) said: When the Imam completes the prayer and sits (for reciting tashahhud), and then becomes defiled (i.e. his ablution becomes void) before he speaks (to someone), his prayer becomes complete. And those who prayed behind him also complete the prayer.
حَدَّثَنَا أَحْمَدُ بْنُ يُونُسَ، حَدَّثَنَا زُهَيْرٌ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ زِيَادِ بْنِ أَنْعُمَ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ رَافِعٍ، وَبَكْرِ بْنِ سَوَادَةَ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ إِذَا قَضَى الإِمَامُ الصَّلاَةَ وَقَعَدَ فَأَحْدَثَ قَبْلَ أَنْ يَتَكَلَّمَ فَقَدْ تَمَّتْ صَلاَتُهُ وَمَنْ كَانَ خَلْفَهُ مِمَّنْ أَتَمَّ الصَّلاَةَ ‏"‏ ‏.‏