the grave. Abū Hanīfah said that one should offer salutations to him while facing the direction of prayer, with one’s back to the grave. ‘Abdullāh ibn ‘Umar would say, “Peace be upon you, O Messenger of Allah. Peace be upon you, O Abū Bakr. Peace be upon you, O my father,” and then leave.
If, even in the mosque of the Messenger of Allah, may Allah bless him and grant him peace, the imams instructed people to face the direction of prayer when supplicating—as reported from the Companions—and disapproved of facing the grave, what, then, of anyone else’s grave? This makes clear to you that deliberately seeking out graves to supplicate there is not part of the religion of the Muslims. Any author of works on pilgrimage rites or other subjects who states something contrary to this has neither evidence to support it nor a transmitted statement from a recognized imam. It is merely something that people have taken from one another, based on hadiths they thought authentic but which are false, or on innovated customs they supposed to be sunnah, without any basis in Islamic law.
During the most virtuous generations, there were no “shrines” built over graves. These only appeared and became widespread under the rule of Banū Buwayh. When the Qarmatians emerged in the lands of the East and West, there were unbelieving heretics in those lands whose aim was to alter the religion of Islam. The extent to which Banū Buwayh agreed with them in some of this, and embraced the innovations of the Jahmiyyah, Mu‘tazilah and Rāfidah, is well known to scholars. They therefore built spurious shrines, “such as the shrine of ‘Alī”—may Allah be pleased with him—and others like it. Fabricators composed hadiths about visiting shrines, praying and supplicating at them, and similar practices. Thus, these heretics and the people of innovation who followed them came to venerate shrines and demean mosques.