Determining the direction of the qibla in mosques
Question
Three years ago, a mosque was erected in a village and prayers have since been held there. The mosque's qibla was determined following the qibla direction in the other village mosques. A dispute arose in January 2004 concerning its accuracy and an engineer from the regional office of the Ministry of Religious Trusts was summoned to determine its proper direction. He determined a new direction which further sparked another dispute between the villagers, dividing them into two groups: one preferring to follow the original qibla and the other favoring the newly determined direction. We would like a clarification on this issue and which of the two directions to face when praying.
Answer
Allah legislated prayer and made it the first pillar of Islam, second only to the two testimonies of faith. The Prophet said, "Islam is built upon five [pillars]: testifying that there is no god save Allah and that Mohammed is the messenger of Allah, performing prayers, paying zakat, making the pilgrimage to the House, and fasting Ramadan" [Bukhari and Muslim]. Allah the Almighty says,
And be steadfast in prayer: Give zakat, and bow down your heads with those who bow down (in worship). [Al-Baqarah: 43]
Allah made facing Al-Masjid Al-Haram among the conditions for the validity of prayers. Based on this, the prescribed prayer of a resident who offers it in safety is valid only if he faces the proper direction due to the words of Allah Who says,
So turn your face toward Al-Masjid al-Haram. And wherever you [believers] are, turn your faces toward it [in prayer]. [Al-Baqarah: 144]
So from wherever you go out [for prayer, O Muhammad] turn your face toward Al- Masjid al-Haram. [Al-Baqarah: 149]
Exceptions
The only exceptions to praying towards the qibla are when a person is engaged in war against disbelievers (the Prayer of Peril) and when offering a supererogatory prayer on board means of transport.
The ruling
The villagers must change the mosque qibla and replace it with the direction determined by the engineer because he is the expert. This is in accordance to the words of Allah Almighty Who says,
Ask the people of knowledge if you do not know. [An-Nahl: 43]
Allah the Almighty knows best.