Answered by Shaykh Faraz Rabbani
What is the ruling when after one has began a prayer one realises one made the a wrong intention?
More spefically I was travelling and started with the intention to pray 4 rakats of Asr. Within the 1st rakat I remembered I was in safar & should have made the inention to offer 2 rakats. I proceeded on this occasion to complete the 4 rakats I had originally intended
Walaikum assalam wa rahmatullah,
I pray that this finds you well, and in the best of health and spirits. May Allah grant you all good and success in this life and the next.
It isn’t obligatory to specify the number of rakats in prayer. Errors in this are overlooked. [ Ibn Abidin, Radd al-Muhtar; Zayla`i, Tabyin al-Haqa’iq; Shaykhzada, Majma` al-Anhur]
However, if you intend the wrong obligatory prayer, you need to restart your prayer–such as if your intention was to prayer Asr, but you were supposed to be praying Zuhr. Note, though, that if you are unsure of your intention, you assume that your intention was sound, as our default assumption about actions is that they are sound unless established otherwise.
And Allah alone gives success.
Faraz Rabbani
لما في الشرنبلالية من أنه لا يشترط نية عدد الركعات
وَالْخَطَأُ فِي عَدَدِ الرَّكَعَاتِ لَا يَضُرُّهُ حَتَّى لَوْ نَوَى الْفَجْرَ أَرْبَعًا وَالظُّهْرَ رَكْعَتَيْنِ أَوْ ثَلَاثًا أَوْ خَمْسًا جَازَ وَتَلْغُو نِيَّةُ التَّعْيِينِ
( وَلَا تُشْتَرَطُ نِيَّةُ عَدَدِ الرَّكَعَاتِ ) فَإِنَّ نِيَّةَ عَدَدِ رَكَعَاتِهَا لَيْسَتْ بِشَرْطٍ فِي الْفَرْضِ وَالْوَاجِبِ ؛ لِأَنَّ قَصْدَ التَّعْيِينِ يُغْنِي عَنْهُ وَلَوْ نَوَى الْفَجْرَ أَرْبَعًا جَازَ ، وَيَنْبَغِي أَنْ تَكُونَ النِّيَّةُ بِلَفْظِ الْمَاضِي ، وَلَوْ فَارِسِيًّا ؛ لِأَنَّهُ الْأَغْلَبُ فِي الْإِنْشَاءَاتِ وَتَصِحُّ بِلَفْظِ الْحَالِ وَاَللَّهُ تَعَالَى أَعْلَمُ .