The Explanation of These Stories is a Proof of the Revelation of Allah to His Messenger

Allah, the Exalted, says to His Prophet concerning these stories and their like,

مِنْ أَنبَآءِ الْغَيْبِ

(of the news of the Unseen) from the information of the unseen of the past. Allah revealed it to you (the Prophet ) in the way that it occurred, as if he witnessed it himself.

نُوحِيهَآ إِلَيْكَ

(which We reveal unto you;) This means, "We teach it to you (Muhammad) as revelation from Us to you."

مَا كُنتَ تَعْلَمُهَآ أَنتَ وَلاَ قَوْمُكَ مِن قَبْلِ هَـذَا

(neither you nor your people knew it before this.) This means that neither you (Muhammad ) nor anyone of your people, have any knowledge of this. This is so that no one who rejects you can say that you learned it from him. Rather, it was Allah Who informed you of it in conformity with the true situation (of the story), just as the Books of the Prophets who were before you testify to. Therefore, you should be patient with the rejection of your people and their harming you. For verily, We shall help you and surround you with Our aid. Then, We will make the (good) end for you and those who follow you in this life and the Hereafter. This is what We did with the Messengers when We helped them against their enemies.

إِنَّا لَنَنصُرُ رُسُلَنَا وَالَّذِينَ ءَامَنُواْ

(Verily, We will indeed make victorious Our Messengers and those who believe.) Allah also said,

وَلَقَدْ سَبَقَتْ كَلِمَتُنَا لِعِبَادِنَا الْمُرْسَلِينَ - إِنَّهُمْ لَهُمُ الْمَنصُورُونَ

(And, verily, Our Word has gone forth of old for Our servants, the Messengers, that they verily, would be made triumphant.) 37:171-172 Then, Allah says,

فَاصْبِرْ إِنَّ الْعَـقِبَةَ لِلْمُتَّقِينَ

(So be patient. Surely, the (good) end is for those who have Taqwa.)