بسم الله الرحمن الرحيم
Only once the rebellious generation had died did Banu Isra'il finally enter the Holy Land by the permission of Allah, ending their 40 years of aimless wandering.
The prophet who led Banu Isra'il into the Holy Land (after Musa had passed away) was Yusha (as), Joshua. Before Yusha (as) was given prophethood he was the servant of the leader of Banu Isra'il, Musa (as), and by spending a lot of time with Musa (as) he was able to benefit from his master's wisdom. Yusha (as) is referred to (as the servant of Musa) in Surah Kahf of the Quran, during an incident when he accompanied Musa (as) on an amazing journey. The Quran says:
"Moses said to his servant [Yusha], 'I will not rest until I reach the place where the two seas meet, even if it takes me years!' " (Surah Kahf: 60)
To read the story of this amazing journey refer to chapter 18 of the Quran ( Surah Kahf ).
The people of the book agree that it was Yusha (as) who led Banu Isra'il into the Holy Land.
Yusha (as) led Banu Isra'il in a fierce battle against the people who lived in Jerusalem. The battle was a difficult one and as the day was drawing to a close Banu Isra'il had not yet achieved victory over their foes. After the time of 'Asr prayer, as Yusha (as) saw the sun beginning to set, he made an amazing supplication with equally amazing results. Yusha (as) commanded the sun with the following words:
"You are commanded and I am commanded as well. Oh Allah! Hold it back from setting."
A hadith of the Prophet Muhammad (peace and blessings be upon him) confirms that Allah answered the dua of Yusha (as). Imam Ahmad narrated from Abu Hurairah (ra) that the Prophet (peace and blessings be upon him) said:
"The sun has never been held back for a human being from setting except for Yusha."
Yusha (as) wanted to achieve victory before the day was over and in his moment of need he called out to Allah for help. Due to the dua of Yusha (as) Allah held the sun back from setting until Yusha (as) and Banu Isra'il had defeated their enemy, yet another amazing miracle of Allah upon Banu Isra'il.
Following this victory Banu Isra'il were able to enter the holy city of Al Quds (Jerusalem). Banu Isra'il were commanded to enter the Holy Land with humility, to acknowledge the continuing blessings of Allah upon them. They were specifically commanded to enter while asking for Allah's forgiveness. Allah describes in the Quran how yet again Banu Isra'il defied what was commanded:
"And when We said: 'Enter this town and eat freely wherever you please, and enter the gate prostrating, and say: we enter begging Allah's forgiveness, so that We forgive you your sins and We shall increase the reward of the righteous.' But those who transgressed substituted a saying other than than that which had been said to them, so We sent down on the transgressors a plague out of the sky for their wickedness." (Surah Baqarah: 58- 59)
Yet again some amongst Banu Isra'il showed utter ingratitude to Allah. They changed what they were commanded to say, replacing 'hitta' (for seeking Allah's forgiveness) with 'habbah', which meant seed. This arrogance and defiance on the part of Banu Isra'il earned them the wrath and punishment of Allah.