Does the prayer of one who prayed Fajr, thinking it was the obligatory prayer, then learned it was the Sunnah prayer (Raghibah), and prayed the obligatory prayer again while in doubt about his prayer, become invalidated?
According to many scholars, such as the Shafi'is and those who agree with them, performing a fard (obligatory) prayer behind someone performing a nafilah (supererogatory) prayer is permissible. Therefore, your performance of the fard prayer behind someone praying the raghibah (a specific supererogatory prayer) is valid. Repeating the fard prayer again earns you reward, as both prayers are valid. However, according to the Malikis, the first prayer behind the raghibah is not valid, but repeating it with the intention of a fard prayer is valid. Thus, you have fulfilled your obligatory Fajr prayer and your responsibility for it has been discharged in any case.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/180468