وَحَدَّثَنِي ، عَنْ مَالِك ، عَنْ
يَحْيَى بْنِ سَعِيدٍ ، عَنْ
سَعِيدِ بْنِ الْمُسَيَّبِ ، أَنَّهُ قَالَ : " صَلَّى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ
بَعْدَ أَنْ قَدِمَ الْمَدِينَةَ سِتَّةَ عَشَرَ شَهْرًا نَحْوَ بَيْتِ الْمَقْدِسِ ثُمَّ حُوِّلَتِ الْقِبْلَةُ قَبْلَ بَدْرٍ بِشَهْرَيْنِ "
It is narrated from Hazrat Sa'id bin Musayyib that the Messenger of Allah (peace be upon him) offered prayers facing Bayt al-Maqdis for sixteen months after coming to Madinah, then the Qiblah was changed two months before the Battle of Badr.