Under this chapter, the following sub-chapters and hadiths have been mentioned.
عَنِ الْبَرَاءِ بْنِ عَازِبٍ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ كَانَ أَوَّلَ مَا قَدِمَ الْمَدِينَةَ نَزَلَ عَلَى أَجْدَادِهِ أَوْ أَخْوَالِهِ مِنَ الْأَنْصَارِ، وَأَنَّهُ صَلَّى قِبَلَ بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ أَوْ سَبْعَةَ عَشَرَ شَهْرًا، وَكَانَ يُعْجِبُهُ أَنْ تَكُونَ قِبْلَتُهُ قِبَلَ الْبَيْتِ وَأَنَّهُ صَلَّى أَوَّلَ صَلَاةٍ صَلَّاهَا صَلَاةَ الْعَصْرِ وَصَلَّى مَعَهُ قَوْمٌ فَخَرَجَ رَجُلٌ مِمَّنْ صَلَّى مَعَهُ فَمَرَّ عَلَى أَهْلِ مَسْجِدٍ وَهُمْ رَاكِعُونَ فَقَالَ: أَشْهَدُ بِاللَّهِ لَقَدْ صَلَّيْتُ مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قِبَلَ مَكَّةَ، قَالَ: فَدَارُوا كَمَا هُمْ قِبَلَ الْبَيْتِ وَكَانَ يُعْجِبُهُ أَنْ يُحَوَّلَ قِبَلَ الْبَيْتِ، وَكَانَ الْيَهُودُ قَدْ أَعْجَبَهُمْ إِذْ كَانَ يُصَلِّي قِبَلَ بَيْتِ الْمَقْدِسِ وَأَهْلُ الْكِتَابِ فَلَمَّا وَلَّى وَجْهَهُ قِبَلَ الْبَيْتِ أَنْكَرُوا ذَلِكَ
It is narrated from Sayyiduna Bara’ bin ‘Azib (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) arrived in Madinah Munawwarah, he first stayed with his ancestors or maternal uncles, who belonged to the Ansar. The Prophet (peace and blessings be upon him) used to pray facing Bayt al-Maqdis for sixteen or seventeen months, although he preferred that his Qiblah be towards the Baytullah. (Eventually, this happened and) the first prayer he offered facing it was the ‘Asr prayer. Some people also prayed with him. One of them passed by a group of people in a mosque while they were in the state of bowing (ruku‘), and he said to them: I bear Allah as my witness that (the Qiblah has been changed and) I have prayed with the Messenger of Allah (peace and blessings be upon him) facing Makkah. Upon hearing this announcement, they turned towards the Baytullah while still in the state of bowing. The Messenger of Allah (peace and blessings be upon him) liked that he be turned towards the Baytullah, but when he used to pray facing Bayt al-Maqdis, it pleased the Jews and the People of the Book (because they considered it as following them). Therefore, when the Prophet (peace and blessings be upon him) turned his face towards the Baytullah, they disliked it.