Quick facts about Maghrib:

Fard: 3 rakat, the only odd-numbered obligatory prayer
Sunnah muakkadah after: 2 rakat
Recitation: aloud in rakat 1 and 2, silent in rakat 3
Starts: the instant the full disk of the sun sets
Ends: when twilight (shafaq) on the horizon disappears
Window: roughly 75 to 90 minutes, the shortest of any fard prayer

Maghrib (Arabic: al-maghrib, "the west" or "the sunset") is the fourth of the five daily prayers and the one that opens the night. It is 3 rakat fard, prayed aloud in its first two rakat, and its window of validity is the shortest of any obligatory prayer. Many Muslims who pray Fajr, Dhuhr, Asr, and Isha without difficulty find Maghrib slipping past them, because sunset coincides with dinner, family, traffic, and the moment the phone lights up. This guide covers everything about Maghrib: when it starts and ends, exactly how to pray its 3 rakat, the sunnah around it, what to do in Ramadan, and the most common mistakes people make.

Tip: FivePrayer computes Maghrib based on your location's true sunset, and the gentle adhan lock arrives in time to protect the short window. Free, no ads, no tracking.

What is Maghrib?

The word maghrib in Arabic comes from the root gh-r-b, which carries the meaning of going away, setting, and the west. The sun sets in the west, so the prayer of sunset took the name al-maghrib. In the Quran, the five daily prayers are anchored in the verse:

"Establish prayer at the decline of the sun till the darkness of the night, and the Quran of dawn. Indeed, the Quran of dawn is witnessed." (Quran 17:78)

Classical exegetes read this verse as covering Dhuhr, Asr, Maghrib, and Isha in its first clause ("the decline of the sun till the darkness of the night"), and Fajr in its second ("the Quran of dawn"). Maghrib is the hinge inside that arc, the prayer that closes the day and opens the night.

It is one of the five fard prayers, obligatory on every adult, sane Muslim. Missing it without a valid excuse is a major sin. The Prophet ﷺ said: "Between a person and disbelief is the abandonment of prayer." (Sahih Muslim 82). Maghrib carries the same weight as the other four.

When Maghrib starts

Maghrib begins the moment the full disk of the sun has disappeared below the horizon. Not when the sun is touching the horizon, and not when the sky still glows orange, but the instant the upper edge of the disk crosses below the line.

The Prophet ﷺ defined this clearly. Anas ibn Malik (RA) reported that the Prophet ﷺ prayed Maghrib when the sun set (Sahih al-Bukhari 561). Salama ibn al-Akwa' (RA) said: "We used to pray Maghrib with the Prophet ﷺ when the sun was hidden by the horizon." (Sahih al-Bukhari 561).

The unanimous position of the four Sunni madhabs is that the entry of Maghrib is sunset. There is no disagreement on this. The disagreement is only about when it ends.

How to know sunset precisely

Three methods, in descending order of accuracy:

  • Astronomical calculation, used by every modern prayer app. Sunset is computed from your latitude, longitude, and date. This is exact to the second.
  • Direct observation, watching the sun cross the horizon. Useful in open country, hard in cities with buildings.
  • The adhan from a reliable local mosque, which itself uses calculation.

When Maghrib ends

This is where the schools differ, and the difference matters.

After the sun sets, the sky goes through stages. First a deep red glow on the western horizon. Then the red fades into a paler, whitish glow. Then full night arrives. These are the two "twilights" classical jurists discuss.

SchoolEnd of MaghribPractical window after sunset
MalikiDisappearance of red twilightroughly 75 to 80 minutes
Shafi'iDisappearance of red twilightroughly 75 to 80 minutes
HanbaliDisappearance of red twilightroughly 75 to 80 minutes
HanafiDisappearance of white twilightroughly 90 minutes

The three majority schools end Maghrib at the disappearance of the red glow, which corresponds astronomically to roughly the sun being 12 degrees below the horizon. The Hanafi position waits for the white twilight to fade, which is around 18 degrees below the horizon, the same threshold most schools use for Isha.

The practical effect is that a Hanafi has roughly a 90-minute window for Maghrib, while a follower of the other three schools has 75 to 80 minutes. Either way, this is the shortest window of any fard prayer.

Why Maghrib is special

Several things set Maghrib apart from the other four daily prayers.

It is the only odd-rakat fard

Fajr is 2. Dhuhr, Asr, and Isha are 4. Maghrib is 3. This 3-rakat structure mirrors Witr at night and gives Maghrib its distinctive shape, two aloud rakats followed by a sit, then one silent rakat to close.

It is prayed aloud

Like Fajr and Isha, Maghrib is one of the prayers in which the imam recites Al-Fatihah and the surah aloud (jahran) in the first two rakat. When praying alone, men recite aloud or quietly to themselves at their preference, though many scholars prefer at least an audible whisper to maintain the sunnah of jahr.

It opens the night

The Islamic day begins at Maghrib, not at midnight. When you pray Maghrib, you are entering a new day. The new month begins when the crescent moon is sighted just after Maghrib. Ramadan, Eid, Muharram, every Islamic date begins at sunset. This makes Maghrib a quiet but real threshold in Muslim time.

It is sandwiched between two iftar moments in Ramadan

During Ramadan, Maghrib carries the extra weight of the iftar. The fast ends at sunset, which is exactly when Maghrib enters. The Prophet ﷺ would break his fast with dates and water at sunset, then pray Maghrib, then return to the full meal. This sequence, dates and water, Maghrib, then dinner, is the sunnah pattern for the entire month.

The narrow window problem

If you ask Muslims which prayer they miss most often, many will say Maghrib. The reason is not laziness. The reason is the structure of the day.

Maghrib arrives at the moment work ends, family gathers, dinner is served, and tiredness peaks. The phone catches you on the way home. A conversation with a parent or spouse pulls you in. You sit down to eat, planning to pray right after, and twenty minutes become forty, and Maghrib has slipped into Isha. The window is short, sometimes 75 minutes in summer, and once Maghrib's twilight has fully disappeared, the prayer is qadha.

The Prophet ﷺ knew the temptation. He said: "Always pray Maghrib early." This urgency is captured in multiple narrations across Bukhari and Muslim. Sahih al-Bukhari 559 records Anas (RA) describing how, after sunset, a man could shoot an arrow and see where it landed, meaning the companions prayed Maghrib while there was still enough light to see, with no delay. The companions did not stretch the window. They prayed at its entry.

The discipline of Maghrib is simple: hear the adhan, stand up, pray. Three rakat takes about three to five minutes. Whatever pulled you, will still be there afterward.

The sunnah around Maghrib

The two rakat after Maghrib

This is the well-known sunnah muakkadah ba'diyyah (strongly emphasized sunnah after). The Prophet ﷺ never left these two rakat at home. They are short and quick. Recite Al-Kafirun in the first and Al-Ikhlas in the second, following the sunnah.

The two rakat before Maghrib

Less well known but authentic. The Prophet ﷺ said: "Between every two adhans there is a prayer, between every two adhans there is a prayer, between every two adhans there is a prayer, for whoever wishes." (Sunan Abi Dawud 1276, Sahih al-Bukhari 624). "Between two adhans" means between the adhan and the iqamah. The companions used to pray 2 light rakat between the Maghrib adhan and iqamah in the mosque. This is sunnah but not muakkadah. Many Muslims today omit it; reviving it is a quiet way to follow the Prophet ﷺ.

The six rakat of Awwabin

Some scholars mention an additional 6 rakat after the post-Maghrib sunnah, called salat al-awwabin (the prayer of those who turn often to Allah). The hadith on this is graded weak by hadith scholars, so it is not emphasized, but Muslims who pray these voluntary rakat hope for the reward without insisting on it as established.

How to pray Maghrib step by step

Here is the full method for the 3-rakat fard. Praying alone or as imam, the structure is identical; if praying behind an imam, follow the imam.

  1. Niyyat (intention). In your heart, intend to pray three rakat of fard Maghrib for the sake of Allah. No need to say it aloud.
  2. Takbiratul ihram. Say Allahu Akbar, raise hands to the ears or shoulders, then place the right hand over the left below the chest (men) or on the chest (women, per some schools).
  3. Opening du'a (sunnah). Recite a short opening du'a silently, such as Subhanaka Allahumma wa bihamdik... or Wajjahtu wajhi..., followed by A'udhu billah and Bismillah.
  4. Rakat 1, aloud. Recite Al-Fatihah aloud, then a surah aloud (commonly a short surah from the last juz). Say Allahu Akbar and go into ruku, recite Subhana Rabbi al-'Azim three times. Rise saying Sami' Allahu liman hamidah, Rabbana wa lakal hamd. Then Allahu Akbar into sujood, recite Subhana Rabbi al-A'la three times. Sit briefly between the two sujood, then second sujood.
  5. Rakat 2, aloud. Stand for rakat 2. Recite Al-Fatihah aloud, then a surah aloud. Ruku, qawmah, two sujood, same as rakat 1.
  6. First tashahhud. After the second sujood of rakat 2, sit and recite the first tashahhud, At-tahiyyatu lillahi was-salawatu wat-tayyibat..., ending at the shahadah. Do not recite salawat on the Prophet ﷺ here; that comes in the final tashahhud.
  7. Rakat 3, silent. Stand saying Allahu Akbar. Recite Al-Fatihah only, silently. Do not add a surah after Al-Fatihah in the third rakat. Ruku, qawmah, two sujood.
  8. Final tashahhud. Sit. Recite the full tashahhud, then the salawat on the Prophet ﷺ (Allahumma salli 'ala Muhammad...), then a du'a of your choice.
  9. Salam. Turn the head right saying As-salamu 'alaykum wa rahmatullah, then left, same. The prayer is complete.
  10. Sunnah ba'diyyah. Stand or move slightly, then pray the 2 rakat sunnah after Maghrib. These are 2 rakat with one tashahhud at the end, recited quietly. Short surahs are preferred.

Key differences from Dhuhr/Asr/Isha

  • 3 rakat instead of 4.
  • Aloud in rakat 1 and 2.
  • Sit for the first tashahhud after rakat 2, not after rakat 3.
  • Stand from the first tashahhud for the final, silent rakat.

Iftar and Maghrib in Ramadan

During Ramadan, the entry of Maghrib is the moment the fast ends. The sequence the Prophet ﷺ established:

  1. At sunset, break the fast with dates and water. Anas (RA) reported: "The Prophet ﷺ used to break his fast with fresh dates before praying. If there were no fresh dates, then dried dates, and if there were no dried dates, he would take a few sips of water." (Sunan Abi Dawud 2356)
  2. Say the iftar du'a: Dhahaba az-zama'u wabtallat al-'uruqu wa thabata al-ajru in sha Allah ("The thirst is gone, the veins are moistened, and the reward is confirmed, if Allah wills.") (Abu Dawud 2357)
  3. Pray Maghrib, in congregation if possible. Don't sit down to a full meal yet.
  4. After Maghrib, return to the dinner table for the full meal.

This sequence prevents two common Ramadan mistakes: praying Maghrib on a heavy stomach with sluggishness, or pushing Maghrib so late into the meal that the window closes. Dates, water, Maghrib, dinner. That is the order.

Common mistakes

  • Praying 2 or 4 rakat instead of 3. Maghrib is always 3 rakat fard. If you forget and pray 2 thinking it was Fajr-style, or pray 4 like Dhuhr, the prayer is invalid in that form. If you only realize before salam, perform sajdah sahw (the corrective sujood) where applicable, or restart depending on madhab guidance.
  • Reciting aloud in the third rakat. The third rakat is silent. Reciting aloud is a mistake, though it does not invalidate the prayer.
  • Adding a surah after Al-Fatihah in the third rakat. Only Al-Fatihah is recited in rakat 3, no additional surah.
  • Delaying past twilight. The window is the shortest. Praying Maghrib when the twilight has already disappeared makes it qadha, not on time.
  • Skipping the first tashahhud. Maghrib has two tashahhuds, one after rakat 2 (short, just at-tahiyyat to the shahadah) and one after rakat 3 (full). Skipping the first one accidentally requires sajdah sahw.
  • Combining without a valid reason. Combining Maghrib and Isha is permitted only with a valid excuse (travel, severe weather, illness depending on madhab). Combining as a routine when home and well is not permitted.
  • Skipping the 2 rakat sunnah after. These are sunnah muakkadah. Leaving them occasionally is not a sin, but leaving them habitually means missing a regular practice of the Prophet ﷺ.

FAQ

Why is Maghrib 3 rakat and not 2 or 4?

This is established by the practice of the Prophet ﷺ, transmitted by countless companions, never as 2 or 4. The wisdom is not explicitly stated, but classical scholars note that 3 rakat sits naturally between the lighter Fajr (2) and the heavier 4-rakat prayers, fitting the moment of transition from day to night.

Can women pray Maghrib aloud?

When praying alone, women generally recite quietly enough that only they can hear themselves. The audible recitation of jahr is mainly for the imam in congregation. There is no requirement for a woman praying alone at home to raise her voice.

What if I sat down for the final tashahhud after rakat 2 by mistake?

If you sat thinking it was the end, then realized rakat 3 was still due, stand back up, complete rakat 3, and perform sajdah sahw before salam. The prayer is valid.

If I miss Maghrib, when do I make it up?

If twilight has disappeared, Maghrib has exited its window. You still owe the prayer as qadha. Pray it as soon as you remember, before Isha if possible. The Prophet ﷺ said: "Whoever forgets a prayer, let him pray it when he remembers it; there is no expiation for it except that." (Sahih al-Bukhari 597)

Is the time of Maghrib a special time for du'a?

Yes. The moment of sunset, the moment of breaking the fast in Ramadan, and the time between Maghrib and Isha are noted in several narrations as times when du'a is more readily accepted. Make du'a in these moments, not only for yourself but for parents, the ummah, and those in difficulty.

What surahs are sunnah for Maghrib?

The Prophet ﷺ sometimes recited long surahs in Maghrib, like Al-A'raf and At-Tur, but more often recited short surahs from the last portion of the Quran. There is no fixed surah. Pick from what you know; short surahs like At-Tin, Al-Ikhlas, or Al-Kafirun are common choices.

Protect the short window

FivePrayer: never lose Maghrib to dinner or scrolling.

Maghrib has the shortest window of any obligatory prayer. FivePrayer's gentle lock at the adhan keeps you from losing it to dinner or scrolling, then quietly steps back when you've prayed. Free on iOS, Android, and Chrome.

Download on theApp Store
Get it onGoogle Play
Also onChrome