Imaam made a mistake in namaz

Assalamu alaikum, Respected Mufti Sahab, I hope you are well by the Grace of Allah Subhanahu T’wala. May Allah keep you and your parents and family well always and give you good long life so that many people and ummah can derive, learn, practice correct and haqq ilm from you and benefit from your lectures, writings etc. Please pray for this sinful and disgraced slave and a well wisher of yours. I am always in very much in need of your dua, Shaikh! Question: 1. In the Asar namaz with jamat the imam sat in the 2nd rikat and someone from back gave luqmah and imam stood up and read the third rikat and then sat from tashhahud, then got up for the forth rikat but according to him third rikat. Then after finishing third he stood up for forth rikat but it was actually fifth rikat. Then after the second sajdah he sat and said Attahiyat and then did one salam and did sajdah sahu and then completed the rest of the namaz. I want to know whether the namaz was valid or should have to be repeated.2 . Now its been few days what should be done it namaz was not valid. Please correct us.
Jazzak Allah!

1 thought on “Imaam made a mistake in namaz”