وَقُلْنَا مِن بَعْدِهِ لِبَنِي إِسْرَايِيلَ اسْكُنُواْ الاَرْضَ
...
But We drowned him and all who were with him. And We said to the Children of Israel after him: "Dwell in the land..."
This is good news for Muhammad, a foretelling of the conquest of Makkah, even though this Surah was revealed in Makkah before the Hijrah. Similarly, the people of Makkah wanted to expel the Prophet from the city, as Allah says in two Ayat:
وَإِن كَادُواْ لَيَسْتَفِزُّونَكَ مِنَ الاٌّرْضِ لِيُخْرِجُوكَ مِنْهَا
And verily, they were about to frighten you so much as to drive you out from the land... (17:76-77)
Hence Allah caused His Messenger to inherit Makkah, so he entered it by force, according to the better-known of the two opinions, and he defeated its people then out of kindness and generosity, he let them go, just as Allah caused the Children of Israel, who had been oppressed, to inherit the land, east and west, and to inherit the land of Fir`awn's people, with its farmland, crops and treasures.
As Allah said,
كَذَلِكَ وَأَوْرَثْنَـهَا بَنِى إِسْرَءِيلَ
thus We caused the Children of Israel to inherit them. (26:59)