to its being made a place of worship. They buried him, peace and blessings be upon him, in the chamber of Ā’ishah, may Allah be pleased with her, contrary to their usual practice of burial in open ground, so that no one would pray at his grave and make it a place of worship, thereby turning his grave into an idol.
While the Prophet’s chamber remained separate from the mosque—until the time of al-Walīd ibn Abd al-Malik—none of the Companions or Successors would enter it to pray there, rub against the grave, or supplicate there. Rather, they would do all of this only in the mosque. When the early generations of Companions and Successors greeted the Prophet, peace and blessings be upon him, and wished to supplicate, they would supplicate facing the direction of prayer, not the grave.
As for standing to greet him, may Allah’s blessings and peace be upon him, Abū Hanīfah said:
“One should face the direction of prayer in this case too, not the grave.”
Most of the imams, however, said:
“Rather, one should face the grave specifically when offering the greeting.”
None of the imams said that one should face the grave when supplicating. The only report to that effect is a fabricated account attributed to Mālik, whose own position is contrary to it.