Jeremiah 18:8
If that nation, against whom I have pronounced, turn from their evil, I will repent of the evil that I thought to do unto them. If that nation, against whom I have pronounced, turn from their evil, I will repent of the evil that I thought to do unto them.
The disaster pronounced against a nation is conditional, so that if that nation turns from its evil God relents and withholds the calamity He had planned to do to it. Even where the judgment has been declared, turning from evil can spare the nation the threatened outcome. God stands over nations with sovereign authority as a potter over clay, with Israel subject to Him, yet the human response to His warning carries real consequences for how He acts.
In its setting Judah was urged to return to good ways and to reform, but the people rejected the call, persisted in their own evil ways, and so left judgment impending upon them. A nation's own course of action determines its relationship to God and how He deals with it, so that the sins of ancestors do not count against a nation that forsakes sin and sincerely turns to God. The same conditional principle works in the opposite direction, for just as repentance can avert threatened evil, disobedience can forfeit promised good.
God's warnings call His people to cease doing evil and to learn to do what is right. His dealings can change in response to people's choices, while His character and His commitment to righteousness and truth do not change. Applied to the individual, the promise calls each person to repent and turn from wrongdoing, since such repentance can save from death, and God offers strength to overcome weakness.