The Maghrib prayer (Arabic: صلاة المغرب‎ ṣalāt al-maġrib, "evening prayer"), prayed just after sunset, is the fourth of five formal daily prayers (salat) performed by practicing Muslims. The formal daily prayers of Islam comprise different numbers of units, called rak'at. The Maghrib prayer has three obligatory (fard) rak'at and two obligatory sunnah and two non obligatory Nafils. The first two fard rak'at are prayed aloud by Imam in congregation, (the person who missed the congregation and is offering prayer alone, he is not bound to speak the first two rakats aloud), and the third is prayed silently. To be considered valid salat, the formal daily prayers must each be performed within their own prescribed time period. People with a legitimate reason have a longer period in which their prayers will be valid.

Time begins When the sun has completely set beneath the horizon; immediately after the Asr prayer period ends and time ends According to the predominant opinions of the Maliki and Shafi'i schools of law, the prescribed prayer time ends as soon as enough time for a person to purify him/herself and pray has passed. After that, according to the Maliki school, the Period of Necessity lasts until a little before dawn, i.e., the beginning of Fajr prayer.