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:14:36

My Lord, indeed they have led astray many among the people. So whoever follows me - then he is of me; and whoever disobeys me - indeed, You are ˹yet˺ Forgiving and Merciful.  

My Lord, truly they, idols, have led many of mankind astray, because of their ˹mankind’s˺ worship of them. So whoever follows me, believing in the Oneness of God, verily belongs with me, belongs with those who follow my religion; and whoever disobeys me, truly You are Forgiving, Merciful: this was before he was aware of the fact that God does not forgive idolatry.
القرآن:١٤:٣٦

رَبِّ إِنَّهُنَّ أَضْلَلْنَ كَثِيرًا مِنَ النَّاسِ ۖ فَمَنْ تَبِعَنِي فَإِنَّهُ مِنِّي ۖ وَمَنْ عَصَانِي فَإِنَّكَ غَفُورٌ رَحِيمٌ  

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