The Messenger of Allah ﷺ used to pray toward Bayt al-Maqdis. Then the verse was revealed, "We have certainly seen the turning of your face toward the heaven, and We will surely turn you to a qiblah with which you will be pleased. So turn your face toward al-Masjid al-Haram" [Baqarah 2:144].A man passed by some people of Banu Salama while they were bowing during the dawn prayer, having already completed one rakah. He called out, "The qiblah has been changed!" So they turned, while still in that position, toward the new qiblah.
حدثنا أبو بكر بن أبي شيبة حدثنا عفان حدثنا حماد بن سلمة عن ثابت
أن رسول الله ﷺ كان يصلي نحو بيت المقدس فنزلت {قد نرى تقلب وجهك في السماء فلنولينك قبلة ترضاها فول وجهك شطر المسجد الحرام} فمر رجل من بني سلمة وهم ركوع في صلاة الفجر وقد صلوا ركعة فنادى ألا إن القبلة قد حولت فمالوا كما هم نحو القبلة