Due to your ignorance, the prayer is valid. However, you shouldn’t have continued with the second prostration. You should have also offered two prostrations after Salam for adding something which was not part of the prayer.

I get confused with number of Rakahs I prayed so I have to end up doing Sujood as Sahw. Today I prayed correctly but accidentally did Sujood as Sahw before tasleem. I remembered during the 1st Sujood but didn’t know if I should continue or just do Tasleem so I finished the Sujood as Sahw. Is my Salah invalid? Should I repeat the Salah?

Prayer |