حَدَّثَنَا مُحَمَّدُ بْنُ عُثْمَانَ بْنِ أَبِي شَيْبَةَ، ثنا مُحَمَّدُ بْنُ عَبْدِ اللهِ بْنِ نُمَيْرٍ، ثنا يُونُسُ بْنُ بُكَيْرٍ، عَنْ مُحَمَّدِ بْنِ إِسْحَاقَ، حَدَّثَنِي مُحَمَّدُ بْنُ أَبِي مُحَمَّدٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ قَالَ: «صُرِفَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ مِنَ الشَّامِ إِلَى الْقِبْلَةِ، فَصَلَّى إِلَى الْكَعْبَةِ فِي رَجَبٍ عَلَى رَأْسِ سَبْعَةَ عَشَرَ شَهْرًا مِنْ مَقْدَمِهِ الْمَدِينَةَ»
Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: The Messenger of Allah (peace and blessings be upon him) was turned (in prayer) from facing Bayt al-Maqdis to the Qiblah, and so he (peace and blessings be upon him) prayed facing the Ka'bah in Rajab, seventeen months after his arrival in Madinah.