Deviating from the qiblah
There is a mosque in our village where a considerable number of Muslims perform their prayers. The mosque cannot accommodate all of them because the qiblah deviates from the mosque's structure. Due to that, it makes fitting a large number of people in the mosque impossible. Is it permissible to redirect the rows such that they are aligned to the building instead of the exact direction of the qiblah? Please note that, the difference between the established qiblah direction in the mosque and that which we seek to establish is three degrees.
Turning towards the direction of the qiblah (direction of prayer) is among the conditions for the validity of prayer; God Almighty says: "So from wherever you go out [for prayer, O Muhammad] turn your face toward al-Masjid al-Haram (The Sacred Sanctuary) and indeed, it is the truth from your Lord. And God is not unaware of what you do. And from wherever you go out [for prayer], turn your face toward al-Masjid al-Haram. And wherever you [believers] may be, turn your faces toward it in order that the people will not have any argument against you, except for those of them who commit wrong; so fear them not but fear Me. And [it is] so I may complete My favor upon you and that you may be guided" (Quran 2:194-150).
A Muslim must do his best to determine the direction of the qiblah. If he cannot determine it through any means, he is to use his own personal reasoning and then perform prayers. The Prophet (peace and blessings be upon him) said: "If I command you to do something, then perform it according to your abilities" (Ahmed).
The exact determination of the qiblah direction is when one sees the Ka'bah itself. When in its proximity, it is impermissible to deviate from it at all. However, if the Ka'bah itself is not visible to the person praying, as in the inquirer's case when in his mosque, there is no harm in deviating slightly to either the right or left from the proper direction provided that he keeps some part of his face aligned with any part of the Ka'bah. Scholars determined this to be 90 degrees i.e. 45 degrees from each direction of the face by facing the direction of the Ka'bah. God Almighty says: "So turn your face toward al-Masjid al-Haram" (Quran 2:144).
There is no objection to adjusting the rows by no more than 45 degrees from any of the qiblah directions already established in the village.
And God Almighty knows best.