There are more than 1.5 billion Muslims in the world, and each time they pray, they turn their faces in one direction, towards Mecca. The Islamic term for this direction isqibla. When a Muslim prepares to pray, no matter where he is, he turns towards the qibla, the direction of the Kaba. The Kaba is a small cube shaped building in the courtyard of the mosque known as Masjid Al Haram, in the city of Mecca, in the country of Saudi Arabia.
“For every nation there is a direction to which they face (in their prayers). So hasten towards all that is good. Wheresoever you may be, God will bring you together (on the Day of Resurrection). Truly, God is Able to do all things. And from wheresoever you start forth (for prayers), turn your face in the direction of Al-Masjid-al-Haram (at Mecca), that is indeed the truth from your Lord. And God is not unaware of what you do.” (Quran 2:148-149)
Muslims do not worship the Kaba, or its contents, it is simply a focal point. Muslims worship One God, the Most Merciful, and the Most Wise. God decreed that when Muslims pray they all face one direction. It is a sign of unity that encapsulates the unity embedded in the religion of Islam.
The Arabic word for prayer is salah and it demotes a connection between the believer and God; when all believers face the same direction it adds an extra dimension to the connection. The prayer connects the believers to God and theqibla connects the believers to one another. It has been said that if one could observe all the Muslims at prayer we would be able to see lines of worshippers bowing and prostrating like the petals of a flower opening and closing in unison.
The qibla was not always oriented towards Mecca. The first Muslims prayed towards the al Aqsa Mosque in Jerusalem. Around sixteen months after Prophet Muhammad and his followers migrated from Mecca to the city of Medina, theqibla was changed to the Kaba. According to accounts by Prophet Muhammad’s companions, the change happened very suddenly. During the noon prayer, Prophet Muhammad, may the mercy and blessings of God be upon him, received a revelation from God instructing him to, “Turn your face towards the Masjid al Haram”.
“Thus, we have made you real believers in Islamic Monotheism, true followers of Prophet Muhammad and his legal ways, a just nation, witnesses over mankind and the Messenger a witness over you. And We made the Qibla (prayer direction towards Jerusalem) which you used to face, only to test those who followed the Messenger from those who would turn on their heels (i.e. disobey the Messenger). Indeed, it was great (heavy) except for those whom God guided. And God would never make your prayers to be lost (i.e. your prayers offered towards Jerusalem). Truly, God is full of kindness, the Most Merciful towards humankind.”
“Verily! We have seen the turning of your (Muhammad) face towards the heaven. Surely, We shall turn you to a Qibla (prayer direction) that shall please you, so turn your face in the direction of Al-Masjid- al-Haram (at Mecca). And wheresoever you people are, turn your faces (in prayer) in that direction…” (Quran 2:143-144)
Changing the direction of prayer establishes Mecca as the fixed central point for worship. It establishes a common sense or purpose.
Throughout the centuries, mathematicians and astronomers have established correct ways to determine the qibla (direction) from any point on the earth’s surface. There are two precise moments each year when the sun is directly above the Kaba, thus the direction of shadows in any sunlit place will point away from the qibla. There are also two moments per year when the sun is directly over the exact opposite position of the Kaba, thus pointing towards the qibla.
It is important the Muslims make every effort to face the right direction when praying; however, slight deviations do not invalidate a person’s prayer. Prophet Muhammad said, “What is between the east and the west is qibla”. Nowadays it is easy to locate the qibla. It is a simple matter to look at a map and draw a line between your location and the city of Mecca. Compasses and computer programs that locate the qibla are readily available and most mosques throughout the world have a niche in the wall to indicate the qibla.
Islam is a religion of unity. Muslims are united by their belief in One God. They are one brotherhood united in the language and ritual of prayer and united by the direction of their worship. The qibla is not only about degrees of latitude or longitude it is about unity. It is about humankind united in the worship of the One God, Creator, and Sustainer of the universe.
 At Tirmidhi, classified as hasan (good) by Sheikh al Albanee.