Surah Al-A'raf, ayah 30

7:30

فَرِيقًا هَدَىٰ وَفَرِيقًا حَقَّ عَلَيۡهِمُ ٱلضَّلَٰلَةُۚ إِنَّهُمُ ٱتَّخَذُواْ ٱلشَّيَٰطِينَ أَوۡلِيَآءَ مِن دُونِ ٱللَّهِ وَيَحۡسَبُونَ أَنَّهُم مُّهۡتَدُونَ ٣٠

Farīqan hadā wafarīqan haqqa 'alayhimud-dalālatu innahumut-takhadhush-shayātīna awliyā'a min dūnillāhi wayahsabūna annahum muhtadūn

A group [of you] He guided, and a group deserved [to be in] error. Indeed, they [i.e., the latter] had taken the devils as allies instead of Allāh while they thought that they were guided.