Throughout his years in Makkah, the Prophet ﷺ prayed facing Bayt al-Maqdis in Jerusalem, as Allah had commanded. After the emigration to Madinah, which lies south of Jerusalem and north of Makkah, facing Jerusalem meant turning his back on the Ka'bah. As the Jews of Madinah grew openly hostile, he longed to face Makkah instead, but he could not change the qibla, the direction of prayer, by his own choice. So he made du'a earnestly by night and by day, even looking up to the sky as he prayed. Allah then revealed Qur'an 2:144, commanding him to turn towards Masjid al-Haram in Makkah. It was the first time Allah had replaced one ruling with another, and the change unsettled the Jews, some Muslims and the pagans of Makkah alike. When some of the Jews mocked it, Allah answered that true piety does not lie in the direction a person faces. When the Companions worried about those who had died while praying towards Jerusalem, Allah promised that He would never let their faith go to waste. From then on, all Muslim prayer has faced the Ka'bah in Makkah.
Outcome: The qibla for all Muslim prayer was permanently changed from Bayt al-Maqdis to the Ka'bah in Makkah.
Significance
This was the first ruling Allah ever abrogated in Islam, and it was a turning point in relations with the Jews of Madinah. Facing their qibla for a time had shown that the Prophet ﷺ came from the same line of prophets as theirs. Turning away from it signalled that he now superseded that line, and that their special status as "the chosen people" had come to an end. It also carried a message to the pagans of Makkah. The Prophet ﷺ, not they, was the one worthy to be the custodian and inheritor of the Ka'bah. The same passage revealed the phrase "ummatan wasata" (an outstanding nation) in Qur'an 2:143. That verse also became the main evidence early scholars used for the ruling on abandoning prayer.
Narration · early in the Madani period, contrasted with what followed
When the Prophet ﷺ first came to Madinah, he wanted to resemble the Jews as much as possible, so that they would feel he was one of them. It was only once it became clear the Jews had made up their minds never to accept him that he began commanding the Muslims to be different from them in every way they could.
“Indeed, We see you [O Prophet] turning your face towards heaven. Now We will make you turn towards a direction [of prayer] that will please you. So from now on, turn your face in the direction of Masjid al-Haram; and wherever you are, turn your face in that direction.”
This ayah is part of the Qibla-change passage of Surah al-Baqarah, revealed around the change of the direction of prayer from Jerusalem to the Ka'bah.
“We have made you an ummatan wasata (outstanding nation). ... We changed the qibla only to test those who followed the Prophet ﷺ versus those who rejected the Prophet ﷺ. ... Allah will never cause your faith to be wasted away.”
This ayah is part of the Qibla-change passage of Surah al-Baqarah, revealed around the change of the direction of prayer from Jerusalem to the Ka'bah.
“Even if you were to bring every proof to the People of the Book, they won't follow your qibla; and you will not follow their qibla; and they themselves don't follow each other's qibla.”
This ayah is part of the Qibla-change passage of Surah al-Baqarah, revealed around the change of the direction of prayer from Jerusalem to the Ka'bah.
Ep.034: cited alongside 2:47 as evidence the Jews viewed themselves as the chosen people, explaining the wisdom of the qiblah change as a message directed at them.
“The foolish people will begin questioning, "Why have they turned away from the qibla that they were upon?"”
This ayah opens Allah's reply to the exact taunt dramatized in the post ("Why did they change the qibla?") -- Q2:142 quotes that objection before answering it.