We live in a village that has only one mosque and this mosque contains a grave in its "Qiblah." What is the "hukum sharei" for praying in this mosque?
Praise be to Allah, the Lord of the Worlds; and blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Allah the Almighty has ordered Muslims to build mosques and to maintain and visit them for devotions. Allah Says (Interpretation of meaning): (The mosques of Allah shall be maintained only by those who believe in Allah and the Last Day…). [9:18 ]. Aisha () said:“The Prophet Muhammad (Blessings and peace of Allah be upon him) ordered Muslims to build mosques in residential areas and to keep them clean and to freshen their air with perfume”. Narrated by Ahmad, Abu Dawood & Termizi. Maintaining mosques means praying in them, abiding by Allah's orders, remembering Allah and reciting the Qur'an. All this should be purely intended for Allah, the Almighty. This is why Islam has forbidden building tombs in mosques or building mosques on graves or tombs. Allah Says (Interpretation of meaning): (And the mosques are for Allah (alone) so invoke not anyone with Allah).[ 72:17]. On the other hand, building mosques on tombs or introducing tombs in mosques is from the work of the Jews and Christians. So, whoever does it is imitating them. It is known that the Prophet Muhammad (Blessings and peace of Allah be upon him) has warned us of imitating them. Abu Hurairah narrated that the Prophet Muhammad (Blessings and peace of Allah be upon him) said: "May Allah kill the Jews! They have made the tombs of their Prophets as places of worship". [al-Bukhari and Muslim]. Muslim added " and the Christians as well". Al-Bukhari and Muslim narrated also from Aisha () as saying: "They (Jews) used to build places of worship on the tombs of their righteous men when they died. These are indeed the worst among all the people". The reason why the Lawmaker, Allah, has forbidden putting mosques on tombs is that this has led many people in the past to polytheism as believing in the person who is known to be righteous, is more probable than believing or fearing a piece of wood or a stone. For this reason, the Prophet Muhammad (Blessings and peace of Allah be upon him) closed this door by forbidding praying in any graveyard whatsoever it is. It is then forbidden for Muslims to pray in such places even if they don't seek any blessing related to that very place. If this is the case here, praying in such a mosques is disliked. Some scholars even forbid it. If people go to this mosque to glorify the tomb, it is most likely that praying in it is forbidden. Anyway, there is no advantage in praying in this mosque. It is safer to pray in another place like a rented house to be used as a mosque or in one of the Muslims' houses where you could gather to pray the congregational prayer or the Friday prayer. You should also try to eradicate this outrageous thing by the good deeds and sayings in order to avoid a more abominable thing. We ask Allah to help you in doing that. Allah knows best.
You can search for fatwa through many choices