When the Messenger of Allah ﷺ was in the throes of death, he began to throw a cloak of his over his face. When it caused him distress, he would uncover his face. While in that state, he said, "May the curse of Allah be upon the Jews and the Christians. They took the graves of their prophets as places of worship," warning against doing what they had done.
و حدثني هارون بن سعيد الأيلي وحرملة بن يحيى قال حرملة أخبرنا وقال هارون حدثنا ابن وهب أخبرني يونس عن ابن شهاب أخبرني عبيد الله بن عبد الله أن
لما نزل برسول الله ﷺ طفق يطرح خميصة له على وجهه فإذا اغتم كشفها عن وجهه فقال وهو كذلك لعنة الله على اليهود والنصارى اتخذوا قبور أنبيائهم مساجد يحذر مثل ما صنعوا