Chapter Four: The Direction of Prayer
باب القبلة
Bab al-Qiblah — Facing the Ka'bah in Prayer
The qiblah is the direction toward the Sacred Ka'bah in Makkah, which every Muslim faces during the prescribed prayers. Facing the qiblah is one of the conditions (shurut) of the validity of the prayer; a prayer performed facing the wrong direction without excuse is invalid. The establishment of the qiblah as the Ka'bah was a pivotal moment in the early life of the Muslim community in Madinah.
قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِي السَّمَاءِ ۖ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَاهَا ۚ فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا وُجُوهَكُمْ شَطْرَهُ
"We have certainly seen the turning of your face toward the sky, and We will surely turn you to a qiblah with which you will be pleased. So turn your face toward the Sacred Mosque (al-Masjid al-Haram). And wherever you [believers] are, turn your faces toward it." (Sūrah al-Baqarah 2:144)
Before this verse was revealed, the Muslims had been praying toward Bayt al-Maqdis (Jerusalem), the qiblah of the previous prophets. The Prophet, peace be upon him, longed to pray toward the Ka'bah — the house built by Ibrahim and Ismail, peace be upon them — and often turned his face toward the sky in anticipation of the revelation. This verse announced the change of qiblah, which occurred in the second year of the Hijrah.
The Story of the Change of Qiblah
عَنِ الْبَرَاءِ رَضِيَ اللَّهُ عَنْهُ قَالَ: كَانَ رَسُولُ اللَّهِ ﷺ يُصَلِّي نَحْوَ بَيْتِ الْمَقْدِسِ، فَنَزَلَتْ: قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِي السَّمَاءِ فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ، فَمَرَّ رَجُلٌ مِنْ بَنِي سَلِمَةَ وَهُمْ رُكُوعٌ فِي صَلَاةِ الْفَجْرِ، فَنَادَى: أَلَا إِنَّ الْقِبْلَةَ قَدْ حُوِّلَتْ، فَمَالُوا كَمَا هُمْ نَحْوَ الْقِبْلَةِ
On the authority of al-Bara' (may Allah be pleased with him): 'The Messenger of Allah, peace be upon him, used to pray facing Bayt al-Maqdis. Then the verse was revealed: "We have certainly seen the turning of your face toward the sky, so turn your face toward the Sacred Mosque." A man from the Banu Salamah passed by while they were in ruku' (bowing) during the Fajr prayer, and called out: "Indeed the qiblah has been changed!" So they turned, while still in their position, toward the new qiblah.' (Agreed upon: Bukhari and Muslim)
This narration illustrates the immediacy of the companions' obedience to Allah's command — they turned mid-prayer without completing the rak'at in the wrong direction. It also provides a legal ruling: if one is informed mid-prayer of the correct direction and was previously facing an incorrect direction, one turns to face the correct direction and continues the prayer.
Prayer While Travelling
عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا قَالَ: كَانَ رَسُولُ اللَّهِ ﷺ يُصَلِّي وَهُوَ مُقْبِلٌ مِنْ مَكَّةَ إِلَى الْمَدِينَةِ عَلَى رَاحِلَتِهِ حَيْثُ كَانَ وَجْهُهُ
On the authority of Ibn Umar (may Allah be pleased with them both): 'The Messenger of Allah, peace be upon him, used to pray while travelling from Makkah to Madinah, upon his mount, facing whichever direction it was facing.' (Agreed upon: Bukhari and Muslim)
This hadith establishes the permissibility of performing voluntary (nafl) prayers while riding or in a vehicle, facing in any direction, without the necessity of facing the qiblah. For obligatory (fard) prayers, however, it is required to face the qiblah if at all possible. If a traveller is unable to determine the qiblah (e.g., in a remote area without compass or landmarks), they should use their best judgment (ijtihad), and their prayer will be valid.