Moses speaks to Israel
Deuteronomy 4
26 I call heaven and earth to witness against you today, that you will soon utterly perish from the land that you are going over the Jordan to possess. You will not live long in it, but will be utterly destroyed. 27 And the Lord will scatter you among the peoples, and you will be left few in number among the nations where the Lord will drive you. 28 And there you will serve gods of wood and stone, the work of human hands, that neither see, nor hear, nor eat, nor smell. 29
But from there you will seek the Lord your God and you will find him, if you search after him with all your heart and with all your soul. 30 When you are in tribulation, and all these things come upon you in the latter days, you will return to the Lord your God and obey his voice. 31
For the Lord your God is a merciful God. He will not leave you or destroy you or forget the covenant with your fathers that he swore to them.
this appears to be a prophecy, and so it is but not any predetermined effect as shown backing up a couple of verses...
24 For the Lord your God is a consuming fire, a jealous God.
25 “When you father children and children's children, and have grown old in the land,
if you act corruptly by making a carved image in the form of anything, and by doing what is evil in the sight of the Lord your God, so as to provoke him to anger,
the condition of their heart is the determining factor of their fate here (and, although I don't know if it is exactly the case here, it is fact in areas where it appears that God is speaking to the group, the gramma shows Him speaking to each individual)
and following a few verses after...
37
And because he loved your fathers and chose their offspring after them[c] and brought you out of Egypt with his own presence, by his great power, 38 driving out before you nations greater and mightier than you, to bring you in, to give you their land for an inheritance, as it is this day,
39 know therefore today, and lay it to your heart, that the Lord is God in heaven above and on the earth beneath; there is no other.
[c] footnote Hebrew
his offspring after him
shows the relativity of God's heart in regard to the condition of their heart