Change of qibla hadith card: he has been commanded to face the Kaaba, so face it (Sahih al-Bukhari 403)

Change of Qibla: From Jerusalem to the Kaaba in the Hadith

For more than a year in Madinah, the Muslims prayed facing Jerusalem. Then, in the middle of a prayer, a man walked into a mosque and announced that the direction had changed, and the whole row turned around. The change of qibla is told in Sahih al-Bukhari, and three verses of Surah Al-Baqarah explain it.

At a glance

  • Source: Sahih al-Bukhari 40 and 403 (also Muslim 525a)
  • Narrated by: Al-Bara’ ibn Azib and Abdullah ibn Umar (may Allah be pleased with them)
  • Grade: Sahih (Bukhari and Muslim)
  • Topic: Salah, the qibla, Quran 2:142–144
  • Practise it: At your next prayer, face the qibla knowing the Companions turned the moment they heard the command.

The change of qibla in Sahih al-Bukhari

Al-Bara’ ibn Azib (may Allah be pleased with him) was among the Ansar of Madinah. He described how the Prophet ﷺ prayed when he first arrived, and how the direction changed:

أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ أَوَّلَ مَا قَدِمَ الْمَدِينَةَ نَزَلَ عَلَى أَجْدَادِهِ ـ أَوْ قَالَ أَخْوَالِهِ ـ مِنَ الأَنْصَارِ، وَأَنَّهُ صَلَّى قِبَلَ بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا، أَوْ سَبْعَةَ عَشَرَ شَهْرًا، وَكَانَ يُعْجِبُهُ أَنْ تَكُونَ قِبْلَتُهُ قِبَلَ الْبَيْتِ، وَأَنَّهُ صَلَّى أَوَّلَ صَلاَةٍ صَلاَّهَا صَلاَةَ الْعَصْرِ، وَصَلَّى مَعَهُ قَوْمٌ، فَخَرَجَ رَجُلٌ مِمَّنْ صَلَّى مَعَهُ، فَمَرَّ عَلَى أَهْلِ مَسْجِدٍ، وَهُمْ رَاكِعُونَ فَقَالَ أَشْهَدُ بِاللَّهِ لَقَدْ صَلَّيْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم قِبَلَ مَكَّةَ، فَدَارُوا كَمَا هُمْ قِبَلَ الْبَيْتِ، وَكَانَتِ الْيَهُودُ قَدْ أَعْجَبَهُمْ إِذْ كَانَ يُصَلِّي قِبَلَ بَيْتِ الْمَقْدِسِ، وَأَهْلُ الْكِتَابِ، فَلَمَّا وَلَّى وَجْهَهُ قِبَلَ الْبَيْتِ أَنْكَرُوا ذَلِكَ. قَالَ زُهَيْرٌ حَدَّثَنَا أَبُو إِسْحَاقَ عَنِ الْبَرَاءِ فِي حَدِيثِهِ هَذَا أَنَّهُ مَاتَ عَلَى الْقِبْلَةِ قَبْلَ أَنْ تُحَوَّلَ رِجَالٌ وَقُتِلُوا، فَلَمْ نَدْرِ مَا نَقُولُ فِيهِمْ، فَأَنْزَلَ اللَّهُ تَعَالَى {وَمَا كَانَ اللَّهُ لِيُضِيعَ إِيمَانَكُمْ}

When the Prophet ﷺ first came to Madinah, he stayed with his grandfathers, or he said his maternal uncles, from the Ansar. He prayed facing Bayt al-Maqdis (Jerusalem) for sixteen or seventeen months, and he loved for his qiblah to be toward the House (the Kaaba). The first prayer he prayed toward it was Asr, and some people prayed with him. Then one of those who had prayed with him went out and passed by the people of a mosque while they were bowing, and said, ‘I bear witness by Allah that I have prayed with Allah’s Messenger ﷺ facing Makkah.’ So they turned, as they were, toward the House. The Jews and the People of the Book had been pleased when he prayed toward Bayt al-Maqdis; when he turned his face toward the House, they objected to it. Al-Bara’ also said in this hadith: some men had died or been killed while the old qiblah was still in place, and we did not know what to say about them. So Allah revealed: “And Allah would never let your faith be lost.”

Bukhari 40 · Narrated by al-Bara’ ibn Azib · Translation adapted from Sunnah.com

Four details stand out: the time (sixteen or seventeen months after the Hijrah), the Prophet’s ﷺ own wish, the first prayer (Asr), and the worshippers who turned while still bowing. Imam Muslim narrates the same report (Muslim 525a).

The verse that answered the Prophet’s ﷺ wish

In another report of al-Bara’ (Bukhari 4486), he says Allah revealed this verse after the Prophet ﷺ had wished for the Kaaba:

قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِى ٱلسَّمَآءِ ۖ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَىٰهَا ۚ فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُۥ ۗ وَإِنَّ ٱلَّذِينَ أُوتُوا۟ ٱلْكِتَـٰبَ لَيَعْلَمُونَ أَنَّهُ ٱلْحَقُّ مِن رَّبِّهِمْ ۗ وَمَا ٱللَّهُ بِغَـٰفِلٍ عَمَّا يَعْمَلُونَ

We have certainly seen the turning of your face, [O Muḥammad], toward the heaven, and We will surely turn you to a qiblah with which you will be pleased. So turn your face [i.e., yourself] toward al-Masjid al-Ḥarām. And wherever you [believers] are, turn your faces [i.e., yourselves] toward it [in prayer]. Indeed, those who have been given the Scripture [i.e., the Jews and the Christians] well know that it is the truth from their Lord. And Allāh is not unaware of what they do.

Surah Al-Baqarah 2:144 · Translation: Saheeh International, from Quran.com

The verse begins with the Prophet ﷺ looking toward the sky, waiting. The command answers a longing, not only a rule about direction.

Quba: turning in the middle of Fajr

Abdullah ibn Umar (may Allah be pleased with him) described what happened at Quba, the mosque just outside Madinah:

بَيْنَا النَّاسُ بِقُبَاءٍ فِي صَلاَةِ الصُّبْحِ إِذْ جَاءَهُمْ آتٍ فَقَالَ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَدْ أُنْزِلَ عَلَيْهِ اللَّيْلَةَ قُرْآنٌ، وَقَدْ أُمِرَ أَنْ يَسْتَقْبِلَ الْكَعْبَةَ فَاسْتَقْبِلُوهَا، وَكَانَتْ وُجُوهُهُمْ إِلَى الشَّأْمِ، فَاسْتَدَارُوا إِلَى الْكَعْبَةِ

While the people were in the Fajr prayer at Quba, someone came to them and said, ‘Quran has been revealed to Allah’s Messenger ﷺ tonight, and he has been commanded to face the Kaaba, so face it.’ Their faces were toward Sham, so they turned around toward the Kaaba.

Bukhari 403 · Narrated by Abdullah ibn Umar · Translation adapted from Sunnah.com

They did not stop the prayer to ask questions or wait to hear it from the Prophet ﷺ himself. One trustworthy man brought the news and they turned. You can read about the reward of praying there in our Masjid Quba hadith.

“What turned them away?” The objection and the answer

Bukhari 40 says some people objected when the qibla changed. The Quran had already given the answer:

۞ سَيَقُولُ ٱلسُّفَهَآءُ مِنَ ٱلنَّاسِ مَا وَلَّىٰهُمْ عَن قِبْلَتِهِمُ ٱلَّتِى كَانُوا۟ عَلَيْهَا ۚ قُل لِّلَّهِ ٱلْمَشْرِقُ وَٱلْمَغْرِبُ ۚ يَهْدِى مَن يَشَآءُ إِلَىٰ صِرَٰطٍ مُّسْتَقِيمٍ

The foolish among the people will say, “What has turned them away from their qiblah, which they used to face?” Say, “To Allāh belongs the east and the west. He guides whom He wills to a straight path.”

Surah Al-Baqarah 2:142 · Translation: Saheeh International, from Quran.com

A direction has no power of its own. East and west belong to Allah, and the believer turns where Allah commands.

What about those who died before the change?

The Companions worried about the men who had died praying toward Jerusalem. The answer came in the next verse:

وَكَذَٰلِكَ جَعَلْنَـٰكُمْ أُمَّةً وَسَطًا لِّتَكُونُوا۟ شُهَدَآءَ عَلَى ٱلنَّاسِ وَيَكُونَ ٱلرَّسُولُ عَلَيْكُمْ شَهِيدًا ۗ وَمَا جَعَلْنَا ٱلْقِبْلَةَ ٱلَّتِى كُنتَ عَلَيْهَآ إِلَّا لِنَعْلَمَ مَن يَتَّبِعُ ٱلرَّسُولَ مِمَّن يَنقَلِبُ عَلَىٰ عَقِبَيْهِ ۚ وَإِن كَانَتْ لَكَبِيرَةً إِلَّا عَلَى ٱلَّذِينَ هَدَى ٱللَّهُ ۗ وَمَا كَانَ ٱللَّهُ لِيُضِيعَ إِيمَـٰنَكُمْ ۚ إِنَّ ٱللَّهَ بِٱلنَّاسِ لَرَءُوفٌ رَّحِيمٌ

And thus We have made you a median [i.e., just] community that you will be witnesses over the people and the Messenger will be a witness over you. And We did not make the qiblah which you used to face except that We might make evident who would follow the Messenger from who would turn back on his heels. And indeed, it is difficult except for those whom Allāh has guided. And never would Allāh have caused you to lose your faith [i.e., your previous prayers]. Indeed Allāh is, to the people, Kind and Merciful.

Surah Al-Baqarah 2:143 · Translation: Saheeh International, from Quran.com

In Bukhari 40, al-Bara’ links the last part of this verse to those men: “Allah would never let your faith be lost” means their prayers counted. The same verse gives a reason for the test: “that We might make evident who would follow the Messenger”.

When did the qibla change?

The authentic hadith above give a length of time, not a date: sixteen or seventeen months after the Prophet ﷺ arrived in Madinah. Many writers place it in the second year after the Hijrah and some name a month, but the hadith on this page do not, so we leave the exact date open.

What the story teaches

Reflection: The people of Quba had prayed toward Jerusalem every day for over a year. One sentence from a trusted man was enough for them to turn mid-prayer. Most of us take far longer to change a habit, even after we know the evidence. The change of qibla is a story about the direction of prayer, and also about how quickly a heart can follow when it trusts Allah and His Messenger ﷺ.

How to practise it

  • Before your next prayer, take a moment to face the qibla with intention, remembering that it was a command answered with obedience.
  • When you learn an authentic hadith that corrects something you do, act on it as the people of Quba did, without waiting for every question to be answered.
  • If you worry about past prayers done in good faith, remember 2:143: Allah does not let sincere worship go to waste. For specific questions about your own prayers, ask a qualified scholar.
  • Tell this story to your children when you teach them which way to pray; it gives the direction a meaning.

Questions people ask

Why did the qibla change?

The Quran gives two reasons. Surah Al-Baqarah 2:144 says Allah turned the Prophet ﷺ to a qibla that would please him, and 2:143 says the earlier qibla was made a test “that We might make evident who would follow the Messenger”.

How long did the Muslims pray toward Jerusalem?

In Madinah, sixteen or seventeen months, according to al-Bara’ ibn Azib in Bukhari 40 and Muslim 525a.

What was the first prayer toward the Kaaba?

Asr. Bukhari 40 says the first prayer the Prophet ﷺ prayed toward the Kaaba was Asr, with some people praying behind him. The people of Quba heard the news during Fajr (Bukhari 403).

Were the prayers toward Jerusalem accepted?

Yes. When the Companions asked about those who had died before the change, Allah revealed “Allah would never let your faith be lost” (2:143), and al-Bara’ explained this as referring to their prayers (Bukhari 40).

Key lessons

Change of qibla: 5 lessons – key lessons card, Bukhari 40 · 403 · Quran 2:142–144
  • In Madinah, the Muslims first prayed toward Bayt al-Maqdis for sixteen or seventeen months.
  • The Prophet ﷺ longed to face the Kaaba, and Allah answered with 2:144.
  • The first prayer toward the Kaaba was Asr; the people of Quba turned in the middle of Fajr.
  • The objection “what turned them away?” is answered: east and west belong to Allah.
  • Allah never lets sincere prayers go to waste (2:143).

Part of our Salah series: see all our salah articles in one place.

The next time you face the qibla, think of the row at Quba turning together, still in prayer. One command, and the whole direction of their worship changed.

Save this to Pinterest so you can tell the story of the qibla to your family later

Change of Qibla: From Jerusalem to the Kaaba in the Hadith – Pinterest pin, Sahih al-Bukhari 403

Share the reward. Send this article to someone who needs it today — teaching a hadith or dua can become a lasting good deed for you, in shaa Allah.

Similar Posts