Al-An'aam • EN-AL-JALALAYN
﴿ ذَٰلِكَ هُدَى ٱللَّهِ يَهْدِى بِهِۦ مَن يَشَآءُ مِنْ عِبَادِهِۦ ۚ وَلَوْ أَشْرَكُوا۟ لَحَبِطَ عَنْهُم مَّا كَانُوا۟ يَعْمَلُونَ ﴾
“Such is God's guidance: He guides therewith whomever He wills of His servants. And had they ascribed divinity to aught beside Him-in vain, indeed, would have been all [the good] that they ever did:”
That religion to which they were guided is God’s guidance wherewith He guides whom He will of His servants; had they hypothetically speaking been idolaters all that they did would have been in vain.