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:22:13

He invokes one whose harm is closer than his benefit - how wretched the protector and how wretched the associate.  

He calls on him (the lām ˹of la-man˺ is extra) whose harm, when worshipped, is likelier than his benefit, even if he were to have any benefit, as he imagines ˹him to have˺. Truly an evil patron, is he, that is, ˹an evil˺ helper, and an evil friend, ˹an evil˺ companion is he. After the mention of ‘the doubter’ and ˹his being in manifest˺ ‘loss’ ˹above, verse 11˺ there follows ˹the mention of˺ the believers and ˹their˺ reward, as follows:
القرآن:٢٢:١٣

يَدْعُو لَمَنْ ضَرُّهُ أَقْرَبُ مِنْ نَفْعِهِ ۚ لَبِئْسَ الْمَوْلَىٰ وَلَبِئْسَ الْعَشِيرُ  

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