I prayed with the Prophet ﷺ facing Bayt al-Maqdis for sixteen months, until the verse in al-Baqarah was revealed, "And wherever you are, turn your faces toward it" [Baqarah 2:144]. It was revealed after the Prophet ﷺ had finished praying. A man from the group set off and passed by some people of the Ansar who were praying, and he told them about it, so they turned their faces toward the House.
حدثنا أبو بكر بن أبي شيبة حدثنا أبو الأحوص عن أبي إسحق
صليت مع النبي ﷺ إلى بيت المقدس ستة عشر شهرا حتى نزلت الآية التي في البقرة {وحيث ما كنتم فولوا وجوهكم شطره} فنزلت بعدما صلى النبي ﷺ فانطلق رجل من القوم فمر بناس من الأنصار وهم يصلون فحدثهم فولوا وجوههم قبل البيت