All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
This question deals with the last part of the verse (what means): {And We never punish until We have sent a Messenger (to give warning).}[Quran 17:15] In fact, this verse includes three things of utmost importance:
Firstly, it is the person who decides his own fate, be it good or bad. It is he who masters his own mind and his own senses. Indeed Allaah has shown all the people the way that leads to the good and the one that leads to the bad.
Secondly, no person bears another person's burden no matter how close they may be to one another. As a matter of fact, everybody bears his own burden and shall not blame but his own soul when he finds himself alone on the Day of Resurrection.
Thirdly, Allaah provided His slaves with a great blessing when He decided not to punish people until He had sent a messenger to warn them against the evil and call them to the good. Allaah Says (what means): {Whoever goes right, then he goes right only for the benefit of his own self. And whoever goes astray, then he goes astray to his own loss. No one laden with burdens can bear another's burden. And We never punish until We have sent a Messenger (to give warning).}[Quran 17:15]
There are many verses dealing with the same issue. All of them agree that Allaah does not throw anyone into Hell unless He has sent messengers to them.
To conclude, Allaah makes it clear that He will not punish any people before sending a messenger to them to guide them to the right path and warn them of the consequences of going astray giving evidence, setting Sharee’ah rules and calling to the good and correct religion. There is no difference in this regard between the era of Prophet Muhammad, sallallaahu ‘alayhi wa sallam, and the consecutive eras that came after him. However, if the call to Islam does not reach someone and he does not hear about Prophet Muhammad, sallallaahu ‘alayhi wa sallam, then the ruling on him is the same as the one who dies before the sending of Muhammad, sallallaahu ‘alayhi wa sallam, as a Prophet and did not know about other prophets. It is narrated in a Hadeeth that such people will be tested and tried on the Last Day. Imaam Ahmad narrated that the Prophet, sallallaahu ‘alayhi wa sallam, said: “Four people will protest on the Day of Judgement: a deaf person who does not hear anything, an insane person, a decrepit person, and one who dies in a period where no Prophet was sent (Fatrah). As for the deaf person, he will say, ‘O my Lord, Islam came (to me) while I could not hear’; the insane person will say, ‘O my Lord, Islam came (to me) while children were throwing dung at me’; the decrepit person will say, ‘O my Lord, Islam came while I could not understand anything;’ and one who died in a period where no prophet was sent will say, ‘O my Lord, no prophet came to me.’ Then Allaah will take a covenant from them that they will obey Him and then send one to tell them to enter Hell. By Him in whose Hand is my soul, if they enter Hell, it will be cool and a means of safety for them.”
Also, it is narrated in Saheeh Muslim that the Prophet, sallallaahu ‘alayhi wa sallam, said: “By him in whose hand is the life of Muhammad, he who amongst the community of Jews or Christians hears about me but does not affirm his belief in that with which I have been sent and dies in this state (of disbelief), shall be but one of the denizens of the Hellfire.”
Allaah Knows best.