[Surah al-Zukhruf: 31–32].
And He Most High says:
“Neither those who disbelieve among the People of the Book nor the polytheists wish any good to be sent down to you from your Lord. Yet Allah singles out for His mercy whomever He wills, and Allah is the Possessor of immense bounty.”
[Surah al-Baqarah: 105].
And when mentioning the prophets, He Most High says:
“And among his descendants were David, Solomon, Job, Joseph, Moses, and Aaron—thus do We reward those who excel in good. And Zechariah, John, Jesus, and Elijah—each was among the righteous. And Ishmael, Elisha, Jonah, and Lot—each We favored above all peoples. And from among their forefathers, descendants, and brothers, We chose them and guided them to a straight path.”
[Surah al-An‘ām: 84–87].
Thus, He stated that He chose them and guided them.
The prophets are the best of creation by the consensus of the Muslims. After them come the affirmers of truth, the martyrs, and the righteous. Were it not necessary that the prophets be among those brought near—who rank above the people of the right—the affirmers of truth would be superior to them, or at least to some of them.
Allah Most High has divided His creation into three classes. Regarding their division in the Hereafter, He Most High says:
“You will become three classes: the people of the right—how blessed are the people of the right! The people of the left—how wretched are the people of the left! And the foremost are indeed the foremost. It is they who are brought near, in Gardens of Bliss.”
[Surah al-Wāqi‘ah: 7–12].
Regarding their division at death, He says:
“If the deceased is one of those brought near, then there will be rest, fragrance, and a Garden of Bliss. If he is one of the people of the right, then: ‘Peace be upon you, for you are one of the people of the right.’ But if he is one of the deniers who went astray, then there will be a welcome of scalding water and burning in Hellfire.”
[Surah al-Wāqi‘ah: 88–94].
Likewise, in Surahs al-Insān and al-Mutaffifīn, He mentions these three classes.