Commentary 7وذلك للمضطر والعليل والناسي. وإن نسيت أن تصلي المغرب والعشاء الآخرة فذكرتهما قبل الفجر فصلهما جميعا إن كان الوقت باقيا، وإن خفت أن تفوتك إحداهما فابدأ بالعشاء الآخرة، فإن ذكرتهما بعد الصبح فصل الصبح، ثم المغرب ثم العشاء قبل طلوع الشمس. فإن نمت عن الغداة حتى تطلع الشمس فصل الركعتين ثم صل الغداة. وإن نسيت التشهد في الركعة الثانية وذكرته في الثالثة فأرسل نفسك وتشهد ما لم تركع، فإن ذكرت بعد ما ركعت فامض في صلاتك، فإذا سلمت سجدت سجدتي السهو وتشهدت فيهما التشهد الذي فاتك. وإن رفعت رأسك من السجدة الثانية في الركعة الرابعة وأحدثت فإن كنت قلت الشهادتين فقد مضت صلاتك وإن لم تكن قلت ذلك فقد مضت صلاتك فتوضأ ثم عد إلى مجلسك وتشهد. وإن نسيت التشهد أو التسليم فذكرته وقد فارقت مصلاك فاستقبل القبلة قائما كنت أو قاعدا وتشهد وسلم. ومن استيقن أنه صلى ستا فليعد الصلاة، ومن لم يدر كم صلى ولم يقع وهمه على شئ فليعد الصلاة. وإذا صلى رجل إلى جانب رجل فقام على يساره وهو لا يعلم ثم علم وهو في صلاته حوله إلى يمينه. ومن وجب عليه سجدتا السهو ونسي أن يسجد هما فليسجد هما متى ذكر. ومن دخل مع قوم في الصلاة وهو يرى أنها الأولى وكانت العصر فليجعلها الأولى ويصلي العصر من بعد، ومن قام في الصلاة المكتوبة فسها فظن أنها نافلة أو قام في نافلة فظن أنها مكتوبة فهو على ما افتتح الصلاة عليه. ولا بأس أن يصلي الرجل الظهر خلف من يصلي العصر، ولا يصلي العصر خلف من يصلي الظهر إلا أن يتوهمها العصر فيصلي معه العصر، ثم يعلم أنها كانت الظهر فتجزي عنها.
This applies to the person who is forced, ill, or forgetful. If you forget to pray Maghrib and Isha, and remember them before dawn, pray both if there is still time. If you fear one of them will be missed, begin with Isha. If you remember them after Fajr, pray Fajr first, then Maghrib, then Isha before sunrise. If you miss Fajr until the sun rises, pray two rak'ahs for the missed prayer, then perform Fajr. If you forget the tashahhud (testification) in the second rak'ah and remember it in the third, pause and sit for the tashahhud as long as you have not yet bowed. If you remember after bowing, continue the prayer, and when you finish, perform two prostrations of forgetfulness and recite the missed tashahhud during them. If you raise your head from the second sajdah in the fourth rak'ah and then break your wudu, if you have said the shahada (testification), your prayer is complete. If you have not yet said it, your prayer is invalid; you must perform wudu again and return to your place, then perform the tashahhud. If you forget the tashahhud or the Tasleem (salutation) and realize it after you have moved from your prayer mat, face the Qiblah whether standing or sitting, then recite the tashahhud and Tasleem. If someone is certain that they prayed six rak'ahs, they should repeat the prayer. If someone is unsure how many rak'ahs they prayed, and their doubt does not settle on any particular number, they should repeat the prayer. If a man prays next to another and mistakenly stands on his left, but later realizes while in prayer, he should turn to his right. If someone needs to perform prostrations of forgetfulness but forgets to do so, they should perform them whenever they remember. If a person joins a group in prayer thinking it is the first rak'ah, but it is Asr, they should make it the first rak'ah and complete Asr after. Similarly, if someone stands in a prayer mistakenly thinking it is a voluntary prayer but later realizes it is obligatory, their prayer is valid as it began. It is permissible for someone to pray Dhuhr behind someone praying Asr, but it is not permissible to pray Asr behind someone praying Dhuhr unless they mistakenly think it is Asr, then they pray Asr with him. This will count as their Asr prayer.