When the Messenger of Allah ﷺ was overcome by the throes of death, he began to draw a cloak of his over his face, and when he felt distressed by it, he would uncover his face. While in that state, he said, "May the curse of Allah be upon the Jews and the Christians, for they took the graves of their prophets as places of worship."
أخبرنا سويد بن نصر قال أنبأنا عبد الله بن المبارك عن معمر ويونس قالا قال الزهري أخبرني عبيد الله بن عبد الله أن
لما نزل برسول الله ﷺ فطفق يطرح خميصة له على وجهه فإذا اغتم كشفها عن وجهه قال وهو كذلك لعنة الله على اليهود والنصارى اتخذوا قبور أنبيائهم مساجد
Bukhari transmitted it in the Book of the Prophets, the chapter on what was mentioned about Banu Israil, hadith 3455, 3453, from the hadith of Ibn Mubarak, and Muslim in the Book of Masjids, the chapter on the prohibition of building a masjid over graves, and so on, hadith 531, from the hadith of Yunus, with the same, and it is also in Al-Kubra, hadith 782.