عَنِ ابْنِ عَبَّاسٍ
قَالَ: لَمَّا دَخَلَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ الْبَيْتَ دَعَا فِي نَوَاحِيهِ كُلِّهَا وَلَمْ يُصَلِّ حَتَّى خَرَجَ مِنْهُ فَلَمَّا خَرَجَ رَكَعَ رَكْعَتَيْنِ فِي قُبُلِ الْكَعْبَةِ وَقَالَ: «هَذِه الْقبْلَة»
When the Prophet (sallallahu alayhi wa sallam) entered the House (the Kaba) he made supplications in all sides of it, but did not perform salat till he had come out. When he came out he prayed two rakas facing the Kaba and said, “This is the qibla.” Bukhari transmitted it and Muslim transmitted it from Ibn Abbas from Usamah ibn Zayd.