It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) and his Companions used to pray facing Bayt al-Maqdis. When this verse was revealed: "So turn your face toward al-Masjid al-Haram, and wherever you are, turn your faces toward it" [Surah al-Baqarah: 144],
a man from Banu Salimah passed by some people and called out to them. They were in the state of bowing in the Fajr prayer, praying toward Bayt al-Maqdis. He said: Listen! Take heed! The qiblah has been turned toward the Ka'bah. He said this twice, so they turned toward the Ka'bah while still in the state of bowing.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2240