his grave would have been left plainly visible, but he disliked that it be taken as a place of worship.
In Ṣaḥīḥ Muslim it is related that five days before he passed away the Messenger of Allah—may Allah bless him and grant him and his family peace—said:
“Those who came before you used to turn graves into places of worship. Beware—do not turn graves into places of worship; I forbid you to do that.”
In Sunan Abū Dāwūd he is also reported to have said:
“May Allah curse women who habitually visit graves and those who build places of worship and set up lamps over them.”
For this reason our scholars have stated:
It is impermissible to build a mosque over graves.
They further ruled:
It is not permissible to dedicate any vow to a grave or to those residing near it—whether a single dirham, oil, wax, an animal, or anything else; every such vow is sinful.
And it is authentically reported in the Ṣaḥīḥ from the Prophet—may Allah bless him and grant him and his family peace—that he said:
“Whoever vows to obey Allah—”