(74) باب الإِمَامِ يُحْدِثُ بَعْدَ مَا يَرْفَعُ رَأْسَهُ مِنْ آخِرِ الرَّكْعَةِ
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.
Reference: Sunan Abi Dawud 617
In-book reference: Book 2, Hadith 227
English translation: Book 2, Hadith 617