Al-Ma'idah' - 5:26

قَالَ فَإِنَّهَا مُحَرَّمَةٌ عَلَيْهِمْ أَرْبَعِينَ سَنَةً يَتِيهُونَ فِي الأَرْضِ فَلاَ تَأْسَ عَلَى الْقَوْمِ الْفَاسِقِينَ
[5:26]
He said: So it shall surely be forbidden to them for forty years, they shall wander about in the land, therefore do not grieve for the nation of transgressors.
Allah said: "Therefore will the land be out of their reach for forty years: In distraction will they wander through the land: But sorrow thou not over these rebellious people.
(Their Lord) said: For this the land will surely be forbidden them for forty years that they will wander in the earth, bewildered. So grieve not over the wrongdoing folk.