Why did Muslims pray facing Jerusalem first, then the Qibla changed to the Kaaba?
When the Prophet, peace and blessings be upon him, arrived in Medina, he faced Jerusalem for sixteen or seventeen months, then Allah Almighty commanded him to face the Kaaba. The wisdom behind this change includes: testing the true believer, and demonstrating that this nation is the best of nations, as Allah chose for it the direction of prayer of Abraham, peace be upon him. Allah Almighty mentioned that the change of the Qiblah was "only that We might know who follows the Messenger from who turns back on his heels." And that the People of the Book envy Muslims for the Qiblah.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/11366