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:40:84

And when they saw Our punishment, they said," We believe in Allah alone and disbelieve in that which we used to associate with Him."  

Then, when they saw Our doom, that is, the severity of Our chastisement, they said, ‘We believe in God alone, and we disavow what we used to associate with Him’.
القرآن:٤٠:٨٤

فَلَمَّا رَأَوْا بَأْسَنَا قَالُوا آمَنَّا بِاللَّهِ وَحْدَهُ وَكَفَرْنَا بِمَا كُنَّا بِهِ مُشْرِكِينَ  

{فلما رأوْا بأسنا} أي شدة عذابنا {قالوا آمنا بالله وحده وكفرنا بما كنا به مشركين}.