He did not sit (qa'da) after the fourth rak'a
Question
One day the 'Asr prayer was being performed. All four rak'as were completed, [and] the imam stood up for a fifth rak'a. The followers prompted him, but he remembered that three rak'as had been prayed, and after completing the fifth rak'a and performing sajda al-sahw he gave the salam. Was the prayer valid or not?
Answer
If he did not sit after the fourth rak'a and prayed five rak'as, then the prayer is not valid; it must be prayed again.
Source: Fatawa Mahmudiyya
Preview. The full text opens with JavaScript enabled.