Sahih al-Bukhari
Sahih al-Bukhari 4486
حَدَّثَنَا أَبُو نُعَيْمٍ، سَمِعَ زُهَيْرًا، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ، رضى الله عنه أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى إِلَى بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا أَوْ سَبْعَةَ عَشَرَ شَهْرًا، وَكَانَ يُعْجِبُهُ أَنْ تَكُونَ قِبْلَتُهُ قِبَلَ الْبَيْتِ، وَإِنَّهُ صَلَّى ـ أَوْ صَلاَّهَا ـ صَلاَةَ الْعَصْرِ، وَصَلَّى مَعَهُ قَوْمٌ، فَخَرَجَ رَجُلٌ مِمَّنْ كَانَ صَلَّى مَعَهُ، فَمَرَّ عَلَى أَهْلِ الْمَسْجِدِ وَهُمْ رَاكِعُونَ قَالَ أَشْهَدُ بِاللَّهِ لَقَدْ صَلَّيْتُ مَعَ النَّبِيِّ صلى الله عليه وسلم قِبَلَ مَكَّةَ، فَدَارُوا كَمَا هُمْ قِبَلَ الْبَيْتِ، وَكَانَ الَّذِي مَاتَ عَلَى الْقِبْلَةِ قَبْلَ أَنْ تُحَوَّلَ قِبَلَ الْبَيْتِ رِجَالٌ قُتِلُوا لَمْ نَدْرِ مَا نَقُولُ فِيهِمْ، فَأَنْزَلَ اللَّهُ {وَمَا كَانَ اللَّهُ لِيُضِيعَ إِيمَانَكُمْ إِنَّ اللَّهَ بِالنَّاسِ لَرَءُوفٌ رَحِيمٌ }
Abu Nu‘aym related to us: He heard Zuhayr, from Abu Ishaq, from al-Bara (may Allah be pleased with him), that the Messenger of Allah prayed toward Jerusalem for sixteen or seventeen months. He liked for his direction of prayer to be toward the House [the Kaaba]. He prayed the afternoon prayer—or performed it—and some people prayed with him. One of them left and passed by people in the mosque while they were bowing. He said, “I swear by Allah, I prayed with the Prophet facing Mecca.” So they turned as they were, toward the House. Some men had died while the direction of prayer was still toward Jerusalem, before it was changed toward the House, and we did not know what to say about them. Then Allah revealed, “Allah would never let your faith go to waste. Indeed, Allah is Most Kind and Most Merciful to the people.”
Translation notes
The source gives the duration as sixteen or seventeen months, and preserves uncertainty in the verb describing the afternoon prayer.