[Machine] I prayed with the Messenger of Allah ﷺ towards the direction of Al-Masjid al-Aqsa for sixteen months. The Prophet of Allah ﷺ used to love to pray towards the Kaaba, so he would raise his head towards the sky. Then, Allah (ﷻ) revealed the verse: "We have certainly seen the turning of your face, [O Muhammad], toward the heaven, and We will surely turn you to a qiblah with which you will be pleased. So turn your face toward Al-Masjid al-Haram" [Quran 2:144]. Al-Bara' said, "We were the qiblah for Allah, then Allah sw the qiblah for us." And in regards to the statement of Allah, "That He may test you." [Quran 2:143], he said, "Allah would not allow the prayer of someone who dies while facing Al-Masjid al-Aqsa to go waste."
صَلَّيْتُ مَعَ رَسُولِ اللهِ ﷺ نَحْوَ بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا وَكَانَ نَبِيُّ اللهِ ﷺ يُحِبُّ أَنْ يُصَلِّيَ نَحْوَ الْكَعْبَةِ فَكَانَ يَرْفَعُ رَأْسَهُ إِلَى السَّمَاءِ فَأَنْزَلَ اللهُ ﷻ {قَدْ نَرَى تَقَلُّبَ وَجْهِكَ فِي السَّمَاءِ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَاهَا فَوَلِّ وَجْهَكَ شَطْرَ الْمَسْجِدِ الْحَرَامِ} [البقرة 144] قَالَ الْبَرَاءُ وَالشَّطْرُ فِينَا قِبَلَهُ وَقَالَ فِي قَوْلِ اللهِ تَعَالَى {لِيُضِيعَ إِيمَانَكُمْ} [البقرة 143] قَالَ مَا كَانَ اللهُ لِيُضِيعَ صَلَاةَ مَنْ مَاتَ وَهُوَ يُصَلِّي نَحْوَ بَيْتِ الْمَقْدِسِ