142. The fools among the people will say:
"What hath turned them from the Qiblah to which they were used?" Say: to Allah belong both East and West; He guideth whom He will to a Way that is straight.
143. Thus have We made of you an Ummah justly balanced, that ye might be witnesses over the nations, and the Messenger a witness over yourselves; and We appointed the Qiblah to which thou wast used, only to test those who followed the Messenger from those who would turn on their heels (from the faith). Indeed it was (a change) momentous, except to those guided by Allah. And never would Allah make your faith of no effect. For Allah is to all people most surely full of kindness, Most Merciful.
144. We see the turning of thy face (for guidance) to the heavens; now shall We turn thee to a Qiblah that shall please thee. Turn then thy face in the direction of the Sacred Mosque; wherever ye are, turn your faces in that direction.
(The Qur'an (Yusuf Ali translation), Surah 2:142-144)
Notice that the people said when Muhammad turned mid-prayer from facing Jerusalem, "
What hath turned them from the Qiblah to which they were used?" They were used to facing Jerusalem. Of course this is a historical fact independant of the Quran.
From
Qibla - Wikipedia
According to the traditional Muslim view, the Qiblah in the Islamic prophet Muhammad's time was originally the Noble Sanctuary in the city of Jerusalem, similar to Judaism.[1][4] This Qiblah was used for over 13 years, from 610 CE until 623 CE. Seventeen months after Muhammad's 622 CE arrival in Medina – the date is given as 11 February 624 – the Qiblah became oriented towards the Kaaba in Mecca.[5][6] According to traditional accounts from Muhammad's companions, the change happened very suddenly during the noon prayer in Medina, in a mosque now known as Masjid al-Qiblaṫayn (Arabic: مَـسْـجِـد الْـقِـبْـلَـتَـيْـن, "Mosque of the Two Qiblahs").[6] Muhammad was leading the prayer when he received revelations from God instructing him to take the Kaaba as the Qiblah (literally, "Turn then Thy face in the direction of the Sacred Mosque.").[6][7] According to the traditional accounts contained in the hadith and sira, Muhammad, who had been facing Jerusalem, upon receiving this revelation, immediately turned around to face Mecca, and those praying behind him also did so.[6]
1 Hartsock, Ralph (2014-08-27). "The temple of Jerusalem: past, present, and future". Jewish Culture and History. 16 (2): 199–201. doi:10.1080/1462169X.2014.953832.
4 Mustafa Abu Sway, The Holy Land, Jerusalem and Al-Aqsa Mosque in the Qur’an, Sunnah and other Islamic Literary Source (PDF), Central Conference of American Rabbis, archived from the original (PDF) on 2011-07-28
5 In the Lands of the Prophet, Time-Life, p. 29
6 William Montgomery Watt (7 February 1974). Muhammad: prophet and statesman. Oxford University Press. pp. 112–113. ISBN 978-0-19-881078-0. Retrieved 29 December 2011.
7 Sura 2 (Al-Baqara), ayah 144, Quran 2:144