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:5:81

And if they had believed in Allah and the Prophet and in what was revealed to him, they would not have taken them as allies; but many of them are defiantly disobedient.  

Yet had they believed in God and the Prophet, Muhammad (s), and what has been revealed to him, they would not have affiliated with them, namely, ˹with˺ the disbelievers; but many of them are wicked, rebellious against faith.
القرآن:٥:٨١

وَلَوْ كَانُوا يُؤْمِنُونَ بِاللَّهِ وَالنَّبِيِّ وَمَا أُنْزِلَ إِلَيْهِ مَا اتَّخَذُوهُمْ أَوْلِيَاءَ وَلَٰكِنَّ كَثِيرًا مِنْهُمْ فَاسِقُونَ  

{ولو كانوا يؤمنون بالله والنبي} محمد {وما أنزل إليه ما اتخذوهم} أي الكفار {أولياء ولكنَّ كثيرا منهم فاسقون} خارجون عن الإيمان.