Before the Night Journey: how did the Prophet ﷺ pray?
The Prophet ﷺ did not wait for the Night Journey to pray. Even before revelation, he would withdraw to the cave of Hira’, near Mecca, to worship God for nights on end (al-Bukhari 3), though we do not know in what form.
From the start of revelation, prayer was part of the life of the first Muslims. Surat al-Muzzammil, among the very first, commands rising at night to pray and recite the Quran. The Prophet ﷺ and his companions did so for a year, until God lightened this obligation, which became voluntary (Muslim 746).
In Mecca, the Prophet ﷺ also prayed in public, near the Ka'bah, so much so that Abu Jahl, one of his worst enemies, tried to stop him by force. The Quran speaks of it: “Have you seen the one who forbids a servant when he prays?” (96:9-10; Muslim 2797).
Even after the Night Journey, its form developed. 'A'ishah relates that prayer was first prescribed as two rak'at; after the emigration to Medina, that of the resident became four, while that of the traveller remained two (al-Bukhari 350, 3935). Maghrib has always had three rak'at.
Prayer was not born with Islam. The Quran mentions it with Abraham (14:40), Ishmael (19:55), Moses (20:14) and Jesus (19:31): all the prophets prostrated before God. The Prophet ﷺ came to complete it.
avant.jpgيَـٰٓأَيُّهَا ٱلۡمُزَّمِّلُ﴿١﴾ قُمِ ٱلَّيۡلَ إِلَّا قَلِيلٗا﴿٢﴾ نِّصۡفَهُۥٓ أَوِ ٱنقُصۡ مِنۡهُ قَلِيلًا﴿٣﴾ أَوۡ زِدۡ عَلَيۡهِ وَرَتِّلِ ٱلۡقُرۡءَانَ تَرۡتِيلًا﴿٤﴾
O you who wraps himself [in clothing] Arise [to pray] the night, except for a little Half of it - or subtract from it a little Or add to it, and recite the Qur'an with measured recitation
أَرَءَيۡتَ ٱلَّذِي يَنۡهَىٰ﴿٩﴾ عَبۡدًا إِذَا صَلَّىٰٓ﴿١٠﴾
Have you seen the one who forbids A servant when he prays
The reference text
«وَكَانَ يَخْلُو بِغَارِ حِرَاءٍ فَيَتَحَنَّثُ فِيهِ ـ وَهُوَ التَّعَبُّدُ ـ اللَّيَالِيَ ذَوَاتِ الْعَدَدِ»
'A'ishah said: “He would withdraw to the cave of Hira’ and engage there in tahannuth (that is, worship) for several nights.”
Sahih al-Bukhari 3 · authentic (sahih) · Read on sunnah.com
«فَإِنَّ اللَّهَ عَزَّ وَجَلَّ افْتَرَضَ قِيَامَ اللَّيْلِ فِي أَوَّلِ هَذِهِ السُّورَةِ فَقَامَ نَبِيُّ اللَّهِ صلى الله عليه وسلم وَأَصْحَابُهُ حَوْلاً وَأَمْسَكَ اللَّهُ خَاتِمَتَهَا اثْنَىْ عَشَرَ شَهْرًا فِي السَّمَاءِ حَتَّى أَنْزَلَ اللَّهُ فِي آخِرِ هَذِهِ السُّورَةِ التَّخْفِيفَ فَصَارَ قِيَامُ اللَّيْلِ تَطَوُّعًا بَعْدَ فَرِيضَةٍ»
'A'ishah said: “Allah, Mighty and Majestic, made the night prayer obligatory at the beginning of this surah [al-Muzzammil]. The Prophet of Allah ﷺ and his companions performed it for a year, and Allah held back the end of the surah in heaven for twelve months, then He revealed at the end of this surah the lightening: the night prayer became voluntary after having been obligatory.”
Sahih Muslim 746 · authentic (sahih) · Read on sunnah.com
«هَلْ يُعَفِّرُ مُحَمَّدٌ وَجْهَهُ بَيْنَ أَظْهُرِكُمْ»
Abu Jahl asked: “Does Muhammad put his face in the dust in front of you?” (He then threatened to crush his neck if he saw him praying.)
Sahih Muslim 2797 · authentic (sahih) · Read on sunnah.com
«فَرَضَ اللَّهُ الصَّلاَةَ حِينَ فَرَضَهَا رَكْعَتَيْنِ رَكْعَتَيْنِ فِي الْحَضَرِ وَالسَّفَرِ، فَأُقِرَّتْ صَلاَةُ السَّفَرِ، وَزِيدَ فِي صَلاَةِ الْحَضَرِ»
'A'ishah said: “When Allah prescribed prayer, He prescribed it as two rak'at, both when resident and when travelling. Then the travel prayer was kept, and that of residence was increased.”
Sahih al-Bukhari 350 · authentic (sahih) · Read on sunnah.com
«فُرِضَتِ الصَّلاَةُ رَكْعَتَيْنِ، ثُمَّ هَاجَرَ النَّبِيُّ صلى الله عليه وسلم فَفُرِضَتْ أَرْبَعًا، وَتُرِكَتْ صَلاَةُ السَّفَرِ عَلَى الأُولَى»
'A'ishah said: “Prayer was prescribed as two rak'at. Then the Prophet ﷺ emigrated, and it was prescribed as four; the travel prayer remained as at first.”
Sahih al-Bukhari 3935 · authentic (sahih) · Read on sunnah.com
What the scholars say
Was there an obligatory prayer before?
Scholars differ. For some, only the night prayer was obligatory, and was then lightened (Muslim 746). For others, there were two prayers, before sunrise and before sunset, based on 40:55 (“glorify your Lord in the evening and the morning”). All agree on one point: the five prayers were only fixed at the Night Journey.
The first to pray with him
According to the biographers, Khadijah, his wife, was the first to believe and pray with him, then 'Ali, still a child, and Zayd ibn Harithah (Ibn Hisham, al-Sirah).
Why two rak'at when travelling?
The traveller does not really “shorten”: he keeps the original form of the prayer, from before the increase in Medina (al-Bukhari 350). See the chapter “Travel and illness”.
Sources: Coran 14:40, 19:31, 19:55, 20:14, 40:55, 73:1-4, 73:20, 96:9-10 ; Sahîh al-Bukhârî 3, 350, 3935 ; Sahîh Muslim 746, 2797 ; Ibn Hajar, Fath al-Bârî, kitâb as-salât ; Ibn Hishâm, as-Sîra an-nabawiyya