Ayesha reported,

The Prophet ﷺ said during the illness in which he died, "May Allah curse the Jews and the Christians, for they took the graves of their prophets as places of worship."She said, "Were it not for that, his grave would have been made visible, but I feared it would be taken as a place of worship."

Bukhari 1330

Sahih

حدثنا عبيد الله بن موسى عن شيبان عن هلال هو الوزان عن عروة

عن عائشة رضي الله عنها

عن النبي ﷺ قال في مرضه الذي مات فيه لعن الله اليهود والنصارى اتخذوا قبور أنبيائهم مسجدا قالت ولولا ذلك لأبرزوا قبره غير أني أخشى أن يتخذ مسجدا

البخاري 1330صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Funerals
Chapter
What is disliked about building mosques over graves
Numbering
Darussalam 1330
Bukhari 1330