Answered by Ustadh Sufyan Qufi
I performed the prostrations of forgetfulness when praying in congregation because I thought I missed saying “Rabana wa lakal hamd”. I was unaware of the ruling that I shouldn’t do this. Is my prayer valid?
In the name of Allah, Most Compassionate, Most Merciful,
I pray this finds you in the best of states.
Your prayer is valid despite mistakenly performing the prostrations of forgetfulness.
The reason for this is that you have performed all the obligatory actions of the prayer in a sound manner without missing any of the conditions for its validity, the last being performing the last sitting for the extent of reciting the tashahud. [Shurunbulali, Nur al-Idah]
The praising after the inclination (i.e., saying “Rabana wa laka al-Hamd” after the ruku’) is from the sunna actions of the prayer, not from the necessary (wajib) actions of the prayer. Thus leaving it does not entail for you to perform the prostrations of forgetfulness as they are only required when forgetting about a wajib action of the prayer. [Shurunbulali, Nur al-Idah]
When praying in congregation with an Imam, the follower will only have to perform the prostrations for what his Imam has forgotten. As for what the follower himself has forgotten, no prostrations of forgetfulness are required. [Shurunbulali, Nur al-Idah]
And Allah knows best.
[Ustadh] Sufyan Qufi
Checked and Approved by Shaykh Faraz Rabbani