وَ لَوْ شَآءَ اللّٰهُ لَجَعَلَهُمْ اُمَّةً وَّاحِدَةً وَّ لٰكِنْ یُّدْخِلُ مَنْ یَّشَآءُ فِیْ رَحْمَتِهٖ وَ الظّٰلِمُوْنَ مَا لَهُمْ مِّنْ وَّلِیٍّ وَّ لَا نَصِیْرٍ(۸)(سورۃ الشوریٰ)
Translation
And if Allah had willed, He could have made them [all] one community, but He admits whom He wills into His mercy. And the wrongdoers have not any protector or helper. (8) (Asan Tarjuma-e-Quran)
Meaning: He could have made everyone Muslim by compulsion, but the actual purpose of creating man was that people should not accept the truth under compulsion, but rather of their own free will and understanding. In this lies their test, upon which the reward and punishment of the Hereafter are based. Therefore, Allah Almighty did not wish to make anyone a Muslim by force. (Asan Tarjuma-e-Quran)