In perakim 38-39 we find the prophecy of the war of Gog from the land of Magog, known more familiarly as the "War of Gog and Magog". This prophecy closes the unit of prophecies of redemption in the book and describes the last stage of the redemption which will occur after the nation returns to their land and the tribes are reunited. The war will involve a large army and many nations and is expected to conclude with a harsh defeat of Gog on Israel i land. The purpose of the war is to sanctify and glorify God's name, in keeping with the perceptions of exile and redemption which we have found throughout the book.
Perek 39 includes an additional prophecy about the war with Gog and parallels perek 38 in many ways, but the focus of the perek is different: while perek 38 deals mostly with Gog coming to the war and ends with its downfall, perek 39 describes at length and in detail Gog's downfall and the results of the downfall- burning the weaponry, cleansing the land of the fallen- and ends with the purpose of the war, the knowledge of God that will spread among the nations and Israel.
Courtesy of Matan Al HaPerek, Directed by Dr. Navah Cohen