A mudrik prayed five rak‘as
Question
A mudrik — one who followed the imam in the prayer from beginning to end — thought in the final sitting: “You still have one or two rak‘as left”, and therefore, after the imam gave the salam, he stood up without giving the salam and completed one rak‘a. Then he thought: “Your four rak‘as had [already] been completed; you prayed this rak‘a contrary to following the imam”, and then he performed sajda al-sahw. Is this person’s prayer valid or not, given that he did not follow the imam in giving the salam?
Answer
His prayer is valid: his inability to follow the imam in the salam and his praying one extra rak‘a in it have been made good by sajda al-sahw.
Source: Fatawa Mahmudiyya
Preview. The full text opens with JavaScript enabled.