We prayed along with the Prophet (ﷺ) facing Jerusalem for sixteen or seventeen months…

Sahih al-Bukhari Book 65 Hadith 19

Sahih al-Bukhari #4492

Prophetic Commentary on the Qur'an (Tafseer of the Prophet (pbuh)) 65:19

Narrated Al-Bara:

We prayed along with the Prophet (ﷺ) facing Jerusalem for sixteen or seventeen months. Then Allah ordered him to turn his face towards the Qibla (in Mecca):-- "And from whence-so-ever you start forth (for prayers) turn your face in the direction of (the Sacred Mosque of Mecca) Al-Masjid-ul Haram.." (2.149)

Chapter: "For every nation there is a direction to which they face (in their prayers)..." (V.2:148)

Grade: Sahih