The time for Maghrib begins when the sun has fully set and lasts until the red twilight disappears from the western sky, according to the majority of scholars. In practice that is usually between about one hour and one and a half hours after sunset in moderate latitudes, and the prayer itself, three units (rak'at), takes only a few minutes. It is best to pray it early.
- Start: immediately after the sun's disc has disappeared below the horizon.
- End: when the red glow (shafaq) has gone, according to the Malikis, Shafi'is, Hanbalis and the Hanafi students Abu Yusuf and Muhammad; Abu Hanifa is reported to have said the white glow that follows.
- Best time: soon after sunset, without delay.
- Far north or south: scholars give special rules where twilight does not fully fade in summer.
Introduction
The question can mean two things: how long the time of Maghrib lasts, and how long the prayer takes. This answer addresses both. The first is a question of the times of prayer, which depends on the location and the season. The second is about the length of the prayer and what the Prophet (saw) recited.
For your own timetable, use a trusted local prayer timetable from your mosque or a recognised authority. The figures below are general and cannot replace it.
The start of the time
The time of Maghrib begins when the sun has set. This is agreed upon by the scholars, and it is indicated by the hadith of the Prophet (saw) in which he said that the time of the Maghrib prayer is as long as the twilight has not gone (Sahih Muslim 612, from Abd Allah ibn Amr). In the hadith that describes how Jibril led the Prophet (saw) in prayer on two days, he led the Maghrib at the time the fasting person breaks the fast on both days (Sunan Abi Dawud 393, Jami' al-Tirmidhi 149; graded hasan by al-Tirmidhi and others). That is why the fast in Ramadan is broken at the same time.
The Qur'an commands:
أَقِمِ الصَّلَاةَ لِدُلُوكِ الشَّمْسِ إِلَىٰ غَسَقِ اللَّيْلِ
Establish prayer from the decline of the sun until the darkness of the night (Qur'an 17:78)
The scholars explained the verse as covering the five prayers: the decline of the sun for Zuhr and Asr, and the darkness of the night for Maghrib and Isha.
The end of the time
The Prophet (saw) said that the time of Maghrib lasts until the twilight (shafaq) disappears (Sahih Muslim 612). The scholars differ on what shafaq means. The majority, including the Malikis, Shafi'is and Hanbalis and the two students of Abu Hanifa, Abu Yusuf and Muhammad al-Shaybani, say that it is the red glow that remains after sunset. Abu Hanifa is reported to have said that it is the white glow that follows the red, which makes the time longer by about twenty to thirty minutes. The Hanafi school generally follows the view of Abu Hanifa in practice, though some Hanafi fatwas follow his students for convenience. The reviewer should check the current position of the school in a text such as al-Hidaya.
The length of the time varies with latitude and season, because the twilight lasts longer in summer in northern countries. In many places, such as the Middle East and South Asia, it is about an hour and a quarter to an hour and a half. In London in the summer it is much longer, and in the far north twilight may not disappear at all, which leads to special rulings.
The question of a single time
The hadith of Jibril mentions that Jibril led Maghrib at the same time on both days, which leads some scholars to say that Maghrib has only a short time. This is reported as the earlier view of Imam al-Shafi'i, who held that it lasts only long enough to purify, dress and pray, though in his later statements he adopted the majority view. The hadith of Abd Allah ibn Amr in Muslim, which is later and explicit, is taken by the majority as the clearer statement, since the Prophet (saw) described the time directly. The scholars also explained that the hadith of Jibril teaches the best time, and the other hadith the extent of the permitted time.
Praying early
The Companions used to pray Maghrib soon after sunset. Rafi' ibn Khadij (ra) said that they prayed Maghrib with the Prophet (saw) and then left, and one of them could see where his arrows landed (Sahih al-Bukhari 559, Sahih Muslim 637). The Prophet (saw) is also reported to have said that his community will remain on the Sunnah or in good so long as they do not delay Maghrib until the stars appear (Sunan Abi Dawud 418; scholars discuss its grading). Scholars recommend hastening to pray it at the start of its time, except in the case of an excuse. The only lawful reason to pray Maghrib after the red glow has gone is a genuine excuse such as travel, illness or a jam of the two prayers, as the rulings on combining prayers provide.
How long is the prayer itself?
Maghrib has three obligatory rak'at, followed by two sunna rak'at. The Prophet (saw) recited different surahs: Jubayr ibn Mut'im (ra) reported that he heard him recite Surah al-Tur in Maghrib (Sahih al-Bukhari 765, Sahih Muslim 463), and Umm al-Fadl (ra) reported that he recited Surah al-Mursalat in his last Maghrib prayer before his death (Sahih al-Bukhari 763, Sahih Muslim 462). It is also reported that he recited short surahs on other occasions. A prayer led by an imam usually takes between five and ten minutes with the short rak'at, and the congregation should follow the imam and not rush.
Where twilight does not fade
In regions at high latitude, the red or white glow may not disappear in summer, and the prayer times cannot be set by the signs. Contemporary scholars and councils have offered several solutions: to follow the timings of the nearest city where the signs can be seen, to fix the time at a proportion of the night, or to follow the timings of Makkah or the average of the nearest day when the signs appear. These solutions are the result of ijtihad, and local mosques normally follow one. The reviewer may wish to cite the rulings of the European Council for Fatwa and Research and of the Muslim World League on this point; I have not read their texts for this answer.
Live it
Maghrib comes as the day ends, a natural moment to turn back to Allah. A dua after prayer: Allahumma a'inni ala dhikrika wa shukrika wa husni 'ibadatik, 'O Allah, help me to remember You, thank You and worship You well' (Sunan Abi Dawud 1522). Reflection question: what do I leave unfinished each evening that I can hand to Allah in prayer?
Conclusion
The time of Maghrib runs from sunset to the loss of the twilight, which in most places is between one hour and an hour and a half, and the prayer itself is short. The best practice is to pray it early. Anyone living where twilight does not fade should follow the local scholars' solution.
References
Qur'an 17:78
Sahih al-Bukhari 559, 763, 765; Sahih Muslim 462, 463, 612, 637
Sunan Abi Dawud 393, 418, 1522; Jami' al-Tirmidhi 149
Al-Marghinani, al-Hidaya; Ibn Qudama, al-Mughni; al-Nawawi, al-Majmu'