Short answer
Fajr lasts until sunrise, so a Fajr finished before the sun starts to rise is on time. But in the Hanafi school, if the sun begins to rise while you are still praying, the prayer is broken and you pray it again once the sun is fully up. With only a few minutes left, pray the two fard rakats straight away.
Fajr time runs from true dawn until sunrise. For men it is mustahabb to pray it once the light has spread (isfar), but early enough that it could be repeated with full recitation before sunrise. If the sun rises during the Fajr prayer, the prayer becomes invalid and is made up after the sun has fully risen.
Other madhhabs
- Shafi'i
- If at least one rakah is prayed before sunrise, the whole prayer counts as on time; praying Fajr early in the darkness is better.
- Maliki
- Catching one rakah before sunrise makes the prayer on time.
- Hanbali
- Fajr is caught by reaching the opening takbir before sunrise, and praying it early is better.
Explanation
Fajr begins at true dawn, when light spreads along the horizon, and ends at sunrise. Use the sunrise time on a reliable timetable as your deadline. Up to that moment, Fajr is on time and not qada.
The Hanafi school has one rule that catches people out. Sunrise is one of the times when no prayer is valid, so if the sun starts to come up while you are in the middle of Fajr, the prayer breaks. You then wait until the sun is fully up, about 15 to 20 minutes after sunrise, and pray it as qada. The other schools say that catching one rakah before sunrise is enough, based on a hadith in Bukhari; Hanafi scholars apply that hadith to Asr and hold that the hadiths forbidding prayer at sunrise govern Fajr.
- Five minutes before sunrise: pray the two fard rakats at once with short surahs. Leave the sunnah and pray it after sunrise, before midday.
- Best time for men in the Hanafi school: when the sky has brightened, leaving a margin before sunrise.
- Not sure you will finish: start anyway; if the sun rises, repeat it after the sun is up.
If you wake up after sunrise, read can you pray Fajr after sunrise. For the sunnah rakats, see praying the Fajr sunnah after the fard.
The evidence
Quran, Surah Al-Israa 17:78
أَقِمِ ٱلصَّلَوٰةَ لِدُلُوكِ ٱلشَّمْسِ إِلَىٰ غَسَقِ ٱلَّيْلِ وَقُرْءَانَ ٱلْفَجْرِ ۖ إِنَّ قُرْءَانَ ٱلْفَجْرِ كَانَ مَشْهُودًۭا ﴿٧٨﴾
Establish prayer at the decline of the sun [from its meridian] until the darkness of the night and [also] the Qur'an of dawn. Indeed, the recitation of dawn is ever witnessed.
Fajr is the prayer of dawn, with its recitation witnessed.
Sahih Muslim 612
Sahih... ووقت صلاة الصبح من طلوع الفجر ما لم تطلع الشمس ...
"The time of the Fajr prayer is from the rise of dawn as long as the sun has not risen."
Fajr ends at sunrise.
Jami' at-Tirmidhi 154
Grading to be checked... أسفروا بالفجر فإنه أعظم للأجر ...
"Pray Fajr when the light has spread, for it brings greater reward."
The Hanafi basis for praying Fajr in the light.
Sahih al-Bukhari 579
Sahih... من أدرك من الصبح ركعة قبل أن تطلع الشمس فقد أدرك الصبح ...
"Whoever catches a rakah of Fajr before the sun rises has caught Fajr."
The hadith the other schools rely on for Fajr.
Where the ruling is recorded
- al-Hidaya, Kitab al-Salah, chapter on prayer times. Praying Fajr in the light (isfar) is recommended; its time ends at sunrise.
- Nur al-Idah with Maraqi al-Falah, Chapter on what invalidates prayer. The Fajr prayer is invalidated if the sun rises during it.
- al-Majmu' (Nawawi), Chapter on prayer times. One rakah before sunrise makes Fajr on time in the Shafi'i school.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.