assemblies and talks of good people, so they will be in harmony and intimacy, and away from his whispers and plots.
﴿رَّبُّكُمْ أَعْلَمُ بِكُمْ إِن يَشَأْ يَرْحَمْكُمْ أَوْ إِن يَشَأْ يُعَذِّبْكُمْ وَمَا أَرْسَلْنَاكَ عَلَيْهِمْ وَكِيلاً﴾ (الإسراء: 54)
54 - You lord knows exactly what is hidden in your souls and knows the readiness of each one of you and his willingness to guidance or error. So when He wills, He shall bestow mercy on you and guide you to faith, and if He wills, He shall torture you for your disbelief and error by His Knowledge and Wisdom. ﴿And your lord does not wrong anyone﴾ [Surat Al Kahf: 94]. O Prophet, We have not made you a guardian to guide polytheists or fix their hearts, but you are a warner and an informer.
﴿وَرَبُّكَ أَعْلَمُ بِمَن فِي السَّمَاوَاتِ وَالأَرْضِ وَلَقَدْ فَضَّلْنَا بَعْضَ النَّبِيِّينَ عَلَى بَعْضٍ وَآتَيْنَا دَاوُودَ زَبُوراً﴾ (الإسراء: 55)
55 - Allah's Knowledge encompasses all that exist in heavens and the earth, knows their conditions and degrees in knowledge and faith, and chooses whomever He wills for His Prophethood. Indeed, We preferred some Prophets over others where Allah spoke to Moses, Jesus came with miracles such as reviving the dead by the permission of Allah, and Allah gave excellence to Muhammad (peace be upon him) over mankind, for he is the messenger of Allah to all mankind. The message of Islam abrogated all past messages. We gave Prophet David psalm which contained invocation, glorification, and praise to Allah (Glory be to Him). Moreover, We gave him honor for his knowledge and obedience not for his kingdom. May Allah send peace and blessings to all Allah's Prophets.
﴿قُلِ ادْعُوا الَّذِينَ زَعَمْتُم مِّن دُونِهِ فَلاَ يَمْلِكُونَ كَشْفَ الضُّرِّ عَنكُمْ وَلاَ تَحْوِيلاً﴾ (الإسراء: 56)
56 - O Messenger, say to polytheists: Invoke these idols, jinn, or angels whom you worship to reveal to you poverty, disease, drought, and others or turn them to others. They do not own that and are not able to do it because they are not gods, for only the true God is the only entitled to be worshipped.
﴿أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ أَيُّهُمْ أَقْرَبُ وَيَرْجُونَ رَحْمَتَهُ وَيَخَافُونَ عَذَابَهُ إِنَّ عَذَابَ رَبِّكَ كَانَ مَحْذُوراً﴾ (الإسراء: 57)
57 - Those who invoke and call polytheists (i.e., the jinn who embraced Islam) seek closeness to Allah by obeying and worshipping Him, and are keen to draw nearer to Him. Moreover, they seek His Mercy and Pardon, and fear from His Torment; indeed Allah's Torment is severe and fearful, and reasonable people avoid it.
It was reported in Sahih Al Bukhari and Sahih Muslim that the Ayah was revealed concerning a group of Arabs who were worshipping jinn, then jinn embraced Islam while humans who were worshipping them did not feel about it.