Page 104
yā-ʾayyuhā n-nāsu qad jāʾakumu r-rasūlu bi-l-ḥaqqi min rabbikum fa-ʾāminū khayran lakum wa-ʾin takfurū fa-ʾinna li-llāhi mā fī s-samāwāti wa-l-ʾarḍi wa-kāna llāhu ʿalīman ḥakīman
O mankind! The Apostle has certainly brought you the truth from your Lord. So have faith! That is better for you. And if you are faithless, [you should know that] to Allah indeed belongs whatever is in the heavens and the earth, and Allah is all-knowing, all-wise.
— Ali Quli Qarai
Surah An-Nisa', Verse 170
170. "O' mankind! the Messenger has came to you with the truth from your Lord; then believe (in him), it is good for you And if you disbelieve, still, to Allah belongs whatever is in the heavens and the earth, and Allah is All-Knowing, All-Wise."
The invitation of Islam is an invitation to all humankind throughout the world. The verse says:
The means of the spread of this invitation, and the weapon of the prophets for the aim, has been its rightfulness.
Before the advent of the holy Prophet (S), the People of the Book, and even the pagans, were waiting for a prophet to come. When the same prophet came, they should believe in him and they would know that believing in him is beneficial for the people themselves. So, they might not hold Islam under obligation for their belief in it, but Allah has conferred a favour upon them for that He has guided them.
Neither the disbelief of people incurs a loss to Allah, nor does their belief bring a gain for Him.
Allah knows that the felicity of people lies in following the path of prophets, and His Wisdom requires sending prophets.