Surah At-Tawbah, ayah 115

9:115

وَمَا كَانَ ٱللَّهُ لِيُضِلَّ قَوۡمَۢا بَعۡدَ إِذۡ هَدَىٰهُمۡ حَتَّىٰ يُبَيِّنَ لَهُم مَّا يَتَّقُونَۚ إِنَّ ٱللَّهَ بِكُلِّ شَيۡءٍ عَلِيمٌ ١١٥

Wamā kānallāhu liyudilla qawmā ba'da idh hadāhum hattā yubayyina lahum mā yattaqūna innallāha bikulli shay'in 'alīm

And Allāh would not let a people stray after He has guided them until He makes clear to them what they should avoid. Indeed, Allāh is Knowing of all things.