In the second year after the Hijrah, the direction of prayer, or Qibla, was changed from Jerusalem to the Kaaba in Makkah. This significant event occurred while the Prophet Muhammad (PBUH) and his followers were in Madinah, and it marked a pivotal moment in the Muslim community's religious practice. The Quran addresses this change directly in Surah al-Baqarah, emphasizing the importance of the Kaaba as the new focal point for prayer.

Initially, the Qibla for the Muslim community was set towards Jerusalem, which was also a sacred site for Jews and Christians. However, the revelation received by the Prophet (PBUH) instructed the believers to turn towards the Sacred Mosque in Makkah. This shift was not just a change in direction but a profound symbol of the distinct identity of the Muslim ummah. The Quran acknowledges that some people would question this change, describing them as 'the foolish among the people' for their criticism, but it affirms that the new direction was chosen by Allah to guide and test the believers.

The reaction among the Muslims was one of obedience and acceptance, though it also highlighted the challenges they faced from other religious communities in Madinah. As the Muslims adjusted to this new direction, it reinforced their connection to the Kaaba, a site with deep historical and spiritual significance for the followers of Islam. The Quranic verses emphasize that true righteousness is not merely about the direction in which one prays but about one's faith and actions.