Abu Bakr as my beloved friend; yet your Companion is the beloved Friend of Allah. Let every small door that opens into the mosque be sealed except Abu Bakr’s door. Those who came before you used to turn graves into places of worship—so do not turn graves into places of worship, for I expressly forbid you to do so.
In the two Ṣaḥīḥ collections it is related that, during his final illness, he was told about a church in Abyssinia famed for its beauty and the images it contained. He said, “Whenever a righteous man among them died, they would build a place of worship over his grave and set up those images. Such people are the worst of creation in Allah’s sight on the Day of Resurrection.”
In the Musnad and in the Ṣaḥīḥ of Abū Ḥātim he ﷺ said, “Among the worst of creation are those upon whom the Hour descends while they are alive, and those who take graves as places of worship.”