Answered by Ustadh Tabraze Azam
Question: Assalam alaykum
I prayed maghrib prayer in 4 cycles instead of 3, would this
invalidate the prayer ?
Also dose going back to repeat a missed step during the prayer when
remembering soon after invalidate the prayer?
Answer: Wa alaikum assalam wa rahmatullah,
If you sat for the final sitting (tashahhud) in the third cycle (rak‘a), then stood to complete a fourth, your prayer was valid. On the other hand, if you accidentally prayed four cycles (rak‘as), your sunset prayer (maghrib) was invalid, and you would need to repeat it.
Normally, if you stand up for an extra cycle, you should simply return back to the final sitting of the prayer, recite the tashahhud, perform the prostrations of forgetfulness (sujud al-sahw), and then end the prayer as normal. But if you prostrate in your extra cycle, your obligatory prayer would be invalidated. You may complete the remainder of the actions to make it a full voluntary prayer (nafila) instead.
(Shurunbulali, Maraqi al-Falah)
And Allah Most High knows best.
[Ustadh] Tabraze Azam
Checked and Approved by Shaykh Faraz Rabbani
Ustadh Tabraze Azam holds a BSc in Computer Science from the University of Leicester, where he also served as the President of the Islamic Society. He memorised the entire Qur’an in his hometown of Ipswich at the tender age of sixteen, and has since studied the Islamic Sciences in traditional settings in the UK, Jordan and Turkey. He is currently pursuing advanced studies in Jordan, where he is presently based with his family.