What is the ruling on praying in mosques whose qibla direction differs from the compass direction, knowing that there are old and new mosques whose qibla varies by different angles, and that the compass direction aligns with the location of Mecca on the map, and is the compass considered an accurate means of determining the qibla? And what should be done about this difference in qibla direction in the questioner's city?
Scholars agree that facing the Qibla is a condition for the validity of prayer, with two exceptions: inability to face it due to extreme fear, and a person performing supererogatory prayers while traveling on a mount. For someone who can see the Kaaba, it is obligatory to face its exact structure. However, for someone who cannot see it, it is obligatory to face its general direction, not its exact structure. This is the view of the majority of jurists.
This is supported by the words of Allah Almighty: "So turn your face toward Al-Masjid Al-Haram. And wherever you [believers] are, turn your faces toward it [in prayer]," where "shatr" (شطر) means direction or side. It is also supported by the Prophet's (peace be upon him) saying: "What is between the East and the West is a Qibla."
One who is far from the Kaaba and cannot see it is only required to face its direction, such that he is reasonably certain that the Qibla is in the direction he is facing, and not to deviate from it by 45 degrees or more. If one prays with a deviation of 45 degrees or more from the Qibla, their prayer is invalid.
If there are Muslim mihrabs (prayer niches), it is not permissible to exercise ijtihad (independent reasoning) and deviate from them to another direction unless certain conditions are met: that the mihrab is agreed upon, and that no significant objection is widely known against it. The compass is an accurate means of determining the Qibla direction, and it is obligatory to act upon it unless it is contradicted by something stronger, such as mihrabs. It is advised not to abandon a mosque if its deviation is not significant, in order to prevent discord and unite hearts.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/58781