to the mosque. The chamber thus became part of the mosque from that time onward. It was built at an angle to the qiblah, with a pointed shape, so that no one would pray facing it. For he, may Allah bless him and grant him peace, said:
“Do not sit on graves or pray facing them.”
Muslim narrated this from Abū Marthad al-Ghanawī. And Allah knows best.
Visiting graves is of two kinds: visits prescribed by Islam and visits that constitute religious innovation.
The purpose of a prescribed visit is to greet the deceased with peace and supplicate for him, just as one does when offering the funeral prayer over him. Visiting him after his death is thus akin to offering the funeral prayer over him. The Sunnah is to greet the deceased with peace and supplicate for him, whether he is a prophet or anyone else. The Prophet, may Allah bless him and grant him peace, used to instruct his Companions, when they visited graves, that each of them should say:
“Peace be upon you, inhabitants of these dwellings, believers and Muslims. We shall, if Allah wills, join you. May Allah have mercy on those among us and you who have gone before and those who come after. We ask Allah for well-being for ourselves and for you. O Allah, do not deprive us of our reward through them, do not put us to trial after them, and forgive us and them.”
This is likewise what one says when visiting the people buried in al-Baqī‘, including the Companions and others, or when visiting the martyrs of Uhud and others. None of the imams of the Muslims considers prayer beside their graves, or anyone else’s graves, recommended. Rather, prayer in mosques that contain no grave of any prophet, righteous person, or anyone else is better than prayer in mosques that contain such graves, by the agreement of the imams of