Ayesha and Abdullah bin Abbas reported,

When death drew near to the Messenger of Allah ﷺ, he began throwing a striped cloak over his face. Whenever he felt distressed, 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," warning against what they had done.

Azami 3094

Sahih

عن عائشة وابن عباس، قالا

لما نزل برسول الله ﷺ طفق يطرح خميصة على وجهه، فإذا اغتم كشفها عن وجهه فقال وهو كذلك: لعنة الله على اليهود والنصارى اتخذوا قبور أنبيائهم مساجد يحذر ما صنعوا.

الأعظمي 3094صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Mosques
Section
Prohibition of taking a grave as a masjid
Numbering
Jami al-Kamil 3094 (2nd edition)
Azami 3094