Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:60:13

O you who have believed, do not make allies of a people with whom Allah has become angry. They have despaired of ˹reward in˺ the Hereafter just as the disbelievers have despaired of ˹meeting˺ the inhabitants of the graves.  

O you who believe, do not befriend a people against whom God is wrathful, namely, the Jews. They have truly despaired of the Hereafter, of ˹attaining˺ its reward — despite their being certain of its truth, out of obstinacy towards the Prophet, even though they know him to be sincere — just as the disbelievers have despaired — they ˹themselves˺ being — of those who are in the tombs, that is to say, those who are entombed ˹and barred˺ from the good of the Hereafter, for they are shown ˹both˺ their ˹would-have-been˺ places in Paradise, had they believed, and the Fire for which they are destined. Meccan or Medinese, consisting of 14 verses.
القرآن:٦٠:١٣

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَتَوَلَّوْا قَوْمًا غَضِبَ اللَّهُ عَلَيْهِمْ قَدْ يَئِسُوا مِنَ الْآخِرَةِ كَمَا يَئِسَ الْكُفَّارُ مِنْ أَصْحَابِ الْقُبُورِ  

{يا أيها الذين آمنوا لا تتولوا قوما غضب الله عليهم} هم اليهود {قد يئسوا من الآخرة} من ثوابها مع إيقانهم بها لعنادهم النبي مع علمهم بصدقه {كما يئس الكفار} الكائنون {من أصحاب القبور} أي المقبورين من خير الآخرة، إذ تعرض عليهم مقاعدهم من الجنة لو كانوا آمنوا وما يصيرون إليه من النار.