al-Ghanawī, who reported that the Prophet, may Allah bless him and grant him peace, said:
“Do not sit on graves, and do not pray facing them.”
In view of this authentic hadith, it is impermissible to pray facing any grave, whether that of a prophet or anyone else. Muslims do not disagree that deliberately praying towards a grave is not prescribed; rather, it is a newly introduced innovation. The same applies to deliberately facing any grave when supplicating, especially the graves of prophets and righteous people. If deliberately facing a grave when supplicating to Allah Most High is impermissible, then invoking the deceased himself is all the more impermissible. Likewise, if praying while facing him is impermissible, then praying to him is all the more so.
It is therefore clear that it is impermissible to ask the deceased for anything: he must not be asked to supplicate to Allah on one’s behalf, or for anything else. Nor is it permissible to complain to him of any affliction in worldly or religious matters, even if it were permissible to complain to him of such things during his lifetime. Doing so during his lifetime does not lead to associating partners with Allah, whereas doing so after his death does. During his lifetime, he is under an obligation to respond to the requests of those who ask him, for which he receives reward and recompense. After death, however, he is no longer subject to religious obligations.
Rather, whatever he does of remembering Allah Most High, supplicating, and similar acts—as Moses prays in his grave, as the prophets prayed behind the Prophet, may Allah bless him and grant him peace, in Jerusalem on the night of the Ascension, and as the inhabitants of Paradise and the angels glorify Allah—is something through which they are granted enjoyment. They perform these acts according to what Allah facilitates and ordains for them; this is not a matter of the religious obligations through which He tests His servants.
Thus, a person’s request to the deceased has no effect whatsoever on this. Rather, he does whatever Allah has appointed him to do, even if no servant asks him, just as the angels do what they are commanded, and they only