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:42:9

Or have they taken protectors ˹or allies˺ besides him? But Allah - He is the Protector, and He gives life to the dead, and He is over all things competent.  

Or have they taken, idols ˹as˺, guardians besides Him? (am, ‘or’, is disjunctive, functioning with the sense of bal, ‘nay, but’, the one used to denote a shift ˹in the subject matter˺; the hamza is for denial, in other words ‘those who are taken’ ˹as guardians˺ are not ˹in fact˺ guardians ˹of anything˺). But God, He ˹alone˺ is the Guardian, in other words, then One who helps believers (the fā’ ˹of fa’Llāhu˺ is merely for coordination) and He revives the dead, and He has power over all things.
القرآن:٤٢:٩

أَمِ اتَّخَذُوا مِنْ دُونِهِ أَوْلِيَاءَ ۖ فَاللَّهُ هُوَ الْوَلِيُّ وَهُوَ يُحْيِي الْمَوْتَىٰ وَهُوَ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ  

{أم اتخذوا من دونه} أي الأصنام {أولياء} أم منقطعة بمعنى: بل التي للانتقال، والهمزة للإنكار أي ليس المتخذون أولياء {فالله هو الولي} أي الناصر للمؤمنين والفاء لمجرد العطف {وهو يحيي الموتى وهو على كل شيءٍ قدير}.