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:7:72

So We saved him and those with him by mercy from Us. And We eliminated those who denied Our signs, and they were not ˹at all˺ believers.  

So We delivered him, namely, Hūd, and those with him, from among the believers, by a mercy from Us, and We cut the root of those, people, who denied Our signs, that is, We extirpated them, and were not believers (wa-mā kānū mu’minīna is a supplement to kadhdhabū, ‘˹those who˺ denied’).
القرآن:٧:٧٢

فَأَنْجَيْنَاهُ وَالَّذِينَ مَعَهُ بِرَحْمَةٍ مِنَّا وَقَطَعْنَا دَابِرَ الَّذِينَ كَذَّبُوا بِآيَاتِنَا ۖ وَمَا كَانُوا مُؤْمِنِينَ  

{فأنجيناه} أي هودا {والذين معه} من المؤمنين {برحمة منا وقطعنا دابر} القوم {الذين كذبوا بآياتنا} أي استأصلناكم {وما كانوا مؤمنين} عطف على كذبوا.