Jeremiah - Chapter 30
In Messianic Times
G-d told Jeremiah to write a scroll with the following message: Days are coming when G-d would restore His people, the nations of Israel and Judah, to the land He gave their ancestors. A sound of terror has been heard, fear rather than peace. (Rashi cites a Midrash that this refers to the war of Gog and Magog, heralding the Messianic era, as we shall see in Ezekiel 38-39.) Men don't give birth, so why are men holding themselves like women in labor? (The pains preceding the Messianic era are called the "birth pangs of the Messiah" and are compared to labor pains.) The day of the downfall of Babylonia (or, perhaps, of Gog) will be unprecedented, but also a time of trouble for the Jews, through which they will be saved. On that day, their servitude to other nations will be cast off; they will only serve G-d and Moshiach (the Messiah) will be their king.
The Jewish people are told not to fear because G-d will save them and their descendants from the lands of their captivity, then they will have peace and no one will antagonize them. G-d will save them and make an end of the nations that oppressed them. The Jews, however, will not be destroyed, as G-d will have punished them for their sins.
The injury inflicted on the Jews is severe; nobody thinks they can be healed. Their allies (Egypt and Assyria) have abandoned them; everyone has written Israel off because G-d has punished them so heavily. Why do they cry from their pain? It is commensurate with their sins!
Those who ravaged Israel will be ravaged; the captors will become captives. Israel will be healed of her wounds. The exiles will return; Jerusalem and the Temple will be rebuilt. Sounds of rejoicing will be heard from there and the people will only increase in number. They will be as precious to G-d as they used to be and their oppressors will be punished.
Their ruler (the Messiah) will emerge from among them and G-d will bring him close. Israel will be G-d's people and He will be their G-d. A storm has gone forth from G-d and it will come to rest on the wicked. G-d's anger will not be sated until He has fulfilled what He said. Then, G-d will be G-d over the whole nation and they will be His people.