Whoever stays in this city will die by the sword, famine or plague. But whoever goes out and surrenders to the Babylonians who are besieging you will live; he will escape with his life. (Jeremiah 21:9)
King Zedekiah sent to Jeremiah, a couple of his officials who told him this: "Inquire now of the Lord for us because Nebuchadnezzar king of Babylon is attacking us. Perhaps the Lord will perform wonders for us as in times past so that he will withdraw from us."(Jeremiah 21:2)
But the counsel of the Lord that Jeremiah gave them was of destruction and impending catastrophe. Yet there remained a way to remain alive and that was by surrendering to the enemy.
The king and the people of Judah were being punished for their sins. Time and again, God had warned them through Jeremiah the prophet of punishment but they chose to persist with their sinful ways and now death and destruction were at their door step. God gives people enough chances to repent of their sins, but when they ignore those warnings, disaster finally hits them.
The Apostle Paul writes of how the Israelites suffered God's wrath for their unfaithfulness and then writes, " These things happened to them as examples and were written down as warnings for us, on whom the fulfillment of the ages has come. So, if you think you are standing firm, be careful that you don't fall! (1 Corinthians 10:11, 12)"