It is stated in the books of seerah (biography of the Prophet, peace and blessings be upon him) that Muslims were facing Jerusalem as the qiblah (direction toward which Muslims turn their faces in Prayer). Then the qiblah of Muslims changed to be the Ka`bah in Makkah upon a command from Almighty Allah, and this was the Prophet’s desire. Among the reasons behind this change is that the Ka`bah was held by all as the holiest of sites.
For more clarification of this, Sheikh Ahmad Kutty, senior lecturer and Islamic scholar said:
The qiblah was changed from Jerusalem to the Ka`bah in Makkah, for the Ka`bah is the first and most ancient House of Worship ever built for all humankind for the purpose of worshipping Almighty Allah alone, as stated in the Qur’an. Almighty Allah says, (The first House [of worship] appointed for humankind was that at Bakkah: Full of blessing and of guidance for all kinds of beings)(Aal `Imran 3:96).
The shift of qiblah from Jerusalem to the Ka`bah thus represents Islam’s stance of calling the humankind away from local or provincial shrines to the First Sanctuary, where the peoples are invited to give heed to the roots of their father, Adam.
In other words, this shift intended to unify the humanity under the Lordship of One God. Islam thus cuts at the root of all tribal, racial, and ethnic divisions that separate the peoples from one another.
Furthermore, we also learn from the traditions of the Prophet (peace and blessings be upon him) that the Ka`bah was the qiblah of the Prophets before him (peace be upon them all). We have been told that all Prophets — such as Abraham, Moses, and Jesus — were also facing the Ka`bah in their Prayers.