Chapters thirty-nine through forty-four contain many details about the third and final invasion that Nebuchadnezzar inflicted on Jerusalem. After six months of besieging Jerusalem, Nebuchadnezzar “broke through the city walls,” burned down the palace and Temple, and broke down the outside walls (Jeremiah 39:1-10). Although they did not try to fight, Zedekiah and his men did not surrender immediately either; instead, they tried to escape, but they were captured and brought to Nebuchadnezzar. He had them all executed, except Zedekiah, who was forced to watch the executions (including his sons), then had his eyes gouged out.
We are not told how Nebuchadnezzar knew directly of Jeremiah, but he made sure that Jeremiah was left unharmed (Jeremiah 39:11-14). He was turned over to Gedaliah, and he remained in Judah with others that Nebuchadnezzar left behind to keep the agriculture going. God also showed grace on Ebed Melech for his protection of Jeremiah and trust in God (Jeremiah 39:15-18). God promised that, although Ebed Melech would see the invasion, he would not be harmed by it but would survive.