- Authors

- Name
- Ahmad
- Role
- Senior Marketing Manager, Islamic education • DeenUp
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
In the name of God, the Most Gracious, the Most Merciful.


The sky changes color as Maghrib arrives — orange fading to deep blue — and for Muslims, that transition is a signal. Of the five daily prayers, Maghrib has the shortest window, which makes it the prayer that most tests your responsiveness to Allah's call. Many Muslims who miss other prayers in the rush of the day find that Maghrib either anchors the entire evening or slips away entirely.
This guide covers every aspect of how to perform Maghrib correctly: the number of rakahs, what to recite in each one, the sunnah prayers that follow, and how to build this prayer into the evening reliably.
How do you perform Maghrib prayer?
Maghrib prayer consists of 3 obligatory (fard) rakahs followed by 2 Sunnah Mu'akkadah rakahs, for a total of 5. It begins immediately after sunset and must be completed before the red twilight disappears — a window of roughly 1 to 1.5 hours. In each fard rakah, recite Surah Al-Fatiha; in the first two, add an additional surah. After the second rakah, sit for the first tashahhud. After the third, complete the final tashahhud and close with salam on both sides.
The Quranic Basis for Maghrib Prayer
Maghrib is one of the five prayers explicitly anchored in Quranic instruction. Allah says in Surah Al-Baqarah (2:238): "Guard strictly the five prayers, especially the middle prayer, and stand before Allah in devout obedience." The sunset prayer specifically appears in Surah Hud (11:114): "Establish prayer at the two ends of the day and in some hours of the night. Indeed, good deeds do away with misdeeds."
The sunset context of Maghrib reflects one of the most significant moments in Islamic spirituality — the transition from day to night, a natural reminder of the constant passage of time and the eventual return to Allah.
The Prophet ﷺ emphasized Maghrib's time constraint: "The time of Maghrib is as long as the twilight has not disappeared" (Sahih Muslim 612). This short window is not a burden — it is a training in prioritizing salah over comfort.
Maghrib Prayer at a Glance
| Rakah | Type | Al-Fatiha | Additional surah | Standing notes |
|---|---|---|---|---|
| 1st | Fard | Required | Required | Recited aloud |
| 2nd | Fard | Required | Required | Recited aloud; first tashahhud after |
| 3rd | Fard | Required | None | Recited quietly; final tashahhud after |
| 4th | Sunnah | Required | Required | Recited quietly |
| 5th | Sunnah | Required | Required | Recited quietly |
Step-by-Step: How to Pray Maghrib
Before You Begin
- Confirm the time: Maghrib begins at sunset. Use a reliable prayer time app or calculation based on your location. Praying before the sun fully sets is not valid.
- Make wudu: Ritual purity is a condition (shart) of salah. If you have wudu from an earlier prayer and nothing has broken it, you may proceed. For a complete guide, see how to perform wudu.
- Face the qibla: Orient yourself toward the direction of the Kaaba in Makkah.
- Set your intention (niyyah): Internally resolve that you are praying 3 fard rakahs of Maghrib prayer for the sake of Allah. The intention is in the heart; it does not need to be spoken aloud.
The 3 Fard Rakahs
Opening Takbir
Raise both hands to shoulder height (or earlobe height, depending on madhab) and say: "Allahu Akbar" — "Allah is the Greatest." This is the takbir al-ihram, which begins the prayer.
Opening Dua (optional)
Silently recite the opening dua (thana): "Subhanakallahumma wa bihamdika wa tabarakasmuka wa ta'ala jadduka wa la ilaha ghairuk" — "Glory be to You, O Allah, and praise. Blessed is Your name, exalted is Your majesty, and there is none worthy of worship but You." (This step is performed in the first rakah only.)
Surah Al-Fatiha
Recite Surah Al-Fatiha aloud in the first two rakahs. After "Ameen" (whether said aloud or silently depends on madhab), proceed to an additional surah.
Additional Surah (Rakahs 1 and 2)
Any Quranic passage is valid. Commonly recited short surahs include:
- Surah Al-Ikhlas (112) — "Say: He is Allah, the One..."
- Surah Al-Kafirun (109) — "Say: O disbelievers..."
- Surah Al-Falaq (113) or Al-Nas (114)
Ruku (Bowing)
Say "Allahu Akbar" as you bow, placing hands on knees, back flat. In this position, say three times: "Subhana Rabbiyal Azim" — "Glorified is my Lord, the Great." Rise saying: "Sami Allahu liman hamidah" — "Allah hears those who praise Him." Then say: "Rabbana lakal hamd" — "Our Lord, all praise is for You."
Sujud (Prostration)
Saying "Allahu Akbar", lower into prostration with seven body parts touching the ground: forehead and nose, two palms, two knees, and two sets of toes. Recite three times: "Subhana Rabbiyal A'la" — "Glorified is my Lord, the Most High." Rise saying "Allahu Akbar" to sit briefly, then prostrate again.
After Rakah 2: First Tashahhud
After the second sujud of the second rakah, sit in tashahhud position. Recite:
التَّحِيَّاتُ لِلَّهِ وَالصَّلَوَاتُ وَالطَّيِّبَاتُ السَّلَامُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ السَّلَامُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ
"All greetings, prayers and good things belong to Allah. Peace be upon you, O Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah. I bear witness that there is none worthy of worship but Allah, and I bear witness that Muhammad is His servant and messenger."
Rakah 3 (Fard)
Stand for the third rakah. Recite only Surah Al-Fatiha — no additional surah. Perform ruku and two sujud as before.
Final Tashahhud and Closing Salam
Sit again in tashahhud position after the third rakah's sujud. Recite the full tashahhud (as above) followed by the salawat (prayers upon the Prophet ﷺ). Then turn your head to the right and say: "As-salamu alaykum wa rahmatullah", then to the left with the same phrase. This salam closes the fard portion of Maghrib.
The 2 Sunnah Rakahs
After the fard, stand and pray 2 additional rakahs with the intention of Sunnah Mu'akkadah. These are prayed exactly as a standard 2-rakah prayer: Al-Fatiha and an additional surah in both rakahs, one tashahhud after the second rakah, and closing salam. These are prayed quietly (not aloud).
Building a Consistent Maghrib Habit
Maghrib's short time window is both its challenge and its gift. Unlike Zuhr or Asr, which can theoretically be delayed for hours, Maghrib forces a decision within minutes. This makes it an ideal anchor prayer — if you establish Maghrib, you establish the entire evening.
Three practical anchors for Maghrib:
- Connect it to sunset: Set a single phone notification for sunset time (not the prayer time — sunset itself). The visual of the sky changing becomes your trigger before the notification sounds.
- Pray it at the masjid when possible: The Prophet ﷺ said: "The prayer in congregation is twenty-seven times more rewarding than a prayer offered individually" (Sahih al-Bukhari 619). Maghrib at the masjid takes under ten minutes and anchors the community aspect of the prayer.
- Pair the sunnah with a brief dua: After completing the sunnah rakahs, make a short personal dua. This turns the sunnah from a formal obligation into a genuine conversation with Allah.
For more on building salah as a daily habit, see our guides on five Muslim prayers and the complete salah guide.
Still struggling to perform salah properly?
Learn each prayer step by step, understand what you are saying, and build a consistent salah habit with clear, scholar-approved lessons in DeenUp.
Take the Salah Quiz
Common Mistakes in Maghrib Prayer
Praying before sunset confirms: Maghrib is invalid if prayed before the sun fully sets below the horizon. When in doubt, wait an additional minute. This is especially relevant in winter when sunset times shift rapidly.
Skipping the first tashahhud: Some people mistakenly rise from the second rakah directly to the third without pausing for the sitting tashahhud. This is a correctable mistake: if you catch it before beginning the third rakah's recitation, return and sit; if you have already begun reciting, continue and perform sujud al-sahw (prostration of forgetfulness) before the final salam.
Rushing the sunnah or skipping it: The 2 sunnah rakahs after Maghrib are among the most emphasized sunnah prayers. The Prophet ﷺ prayed them consistently. Treat them as part of Maghrib, not an optional add-on.
Praying the sunnah in the same spot as the fard: It is sunnah to move slightly or leave and return before praying the sunnah rakahs, based on the Prophet's practice of separating the two. A small step forward or sideways is sufficient.
Maghrib and the Remembrance of the Evening
Maghrib marks the entry into the Islamic evening, and the Prophet ﷺ prescribed specific adhkar (remembrances) for this transition. After completing the prayer, recite:
اللَّهُمَّ إِنِّي أَسْأَلُكَ خَيْرَ هَذِهِ اللَّيْلَةِ
"O Allah, I ask You for the good of this night."
This short evening dua is part of the broader practice of adhkar al-masa' — evening remembrances that act as a shield and a beginning for the nighttime hours. For the full set of these adhkar, see morning adhkar in Islam, which covers the complementary morning set, and the article on Maghrib salat rakat for further details on the prayer's structure.
The Quranic foundation for evening remembrance appears in Surah Qaf (50:39): "So be patient over what they say and exalt the praises of your Lord before the rising of the sun and before its setting." The sunset prayer is not incidental — it is woven into the fabric of Quranic instruction.
The full context of the five prayers in Islamic jurisprudence is available on quran.com/2/238 for the verse commanding their protection, and quran.com/11/114 for the sunset reference specifically.
Closing
Maghrib is the pivot of the day. It is the prayer where the work hours end and the family and worship hours begin. Praying it on time — even when dinner is on the stove or traffic is impossible — is one of the clearest ways a Muslim can demonstrate that salah is not an item on a schedule but a relationship with the Creator.
The step-by-step structure above covers every element you need to pray Maghrib correctly from tonight forward. If you have been praying it and want to deepen your understanding of what each posture and phrase means, the complete salah guide covers the full meaning behind each act of prayer.
Still struggling to perform salah properly?
Learn each prayer step by step, understand what you are saying, and build a consistent salah habit with clear, scholar-approved lessons in DeenUp.
Take the Salah Quiz
Frequently Asked Questions
How many rakahs is Maghrib prayer?
Maghrib prayer consists of 3 obligatory (fard) rakahs followed by 2 Sunnah Mu'akkadah rakahs, for a total of 5 rakahs. The 3 fard rakahs are the minimum required; missing the 2 sunnah is disliked but not sinful. The fard rakahs make Maghrib the only odd-numbered obligatory prayer among the five daily prayers.
When is the time for Maghrib prayer?
Maghrib prayer begins immediately after sunset and extends until the red twilight disappears from the horizon, roughly 1 to 1.5 hours after sunset depending on the season and location. It is the shortest prayer window of the five daily prayers. The Prophet said: 'The time of Maghrib is as long as the twilight has not disappeared' (Sahih Muslim 612).
What do I recite in each rakah of Maghrib?
In all 3 fard rakahs, recite Surah Al-Fatiha after the opening takbir and dua. In the first two rakahs, add any Quranic surah after Al-Fatiha (Surah Al-Ikhlas or Al-Kafirun are common). The third rakah contains only Al-Fatiha. Ruku involves saying 'Subhana Rabbiyal Azim' three times; sujud involves 'Subhana Rabbiyal A'la' three times.
Is the sunnah after Maghrib obligatory?
The 2 rakahs of Sunnah Mu'akkadah after Maghrib are strongly recommended but not obligatory (fard). Missing them without reason is discouraged. The Prophet ﷺ prayed these sunnah rakahs consistently, which is why they are called 'confirmed sunnah.' Many scholars note they are among the most emphasized sunnah prayers of the day.
What is the dua after Maghrib prayer?
After completing the salam, recommended dhikr includes saying 'Subhanallah' 33 times, 'Alhamdulillah' 33 times, and 'Allahu Akbar' 34 times (Sahih Muslim 597). Many Muslims also recite Ayat al-Kursi (Quran 2:255) after every obligatory prayer. Additionally, the dua: 'Allahumma inni as'aluka khayr hadha al-layl' — asking for the good of that night — is narrated in authentic sources for the Maghrib time.
Can I combine Maghrib and Isha prayers while traveling?
Yes. When traveling, it is permissible to combine Maghrib and Isha (jam' al-safar). The majority of scholars allow combining them either at Maghrib time (jam' al-taqdim) or at Isha time (jam' al-takhir). The scholarly consensus based on Sahih Muslim 705 is that the Prophet ﷺ combined these prayers during journeys. Each prayer is prayed in full — Maghrib remains 3 rakahs; only Isha is shortened to 2 rakahs.
What if I miss Maghrib prayer?
A missed Maghrib prayer must be made up (qada) as soon as possible. The obligation to make up missed prayers is based on the hadith: 'Whoever forgets a prayer should pray it when he remembers it' (Sahih al-Bukhari 597). Make up Maghrib with its 3 fard rakahs; the sunnah makeup is optional according to most scholars. If you missed multiple prayers, pray them in order.