I found this comprehensive discussion of several of the apocalyptic visions of the Jewish sages...
http://download.yutorah.org/2008/1053/726192.pdfGog and MagogFor a variety of reasons, is clear that sometime in the amoraic period, apocalyptic traditions were the subject of renewed interest and discussion in rabbinic circles. No doubt, the same was the case among the common people in both the land of Israel and in Babylonia. But for some reason, the emphasis changed in the manner in which such apocalyptic traditions were represented. In some rabbinic texts and in the later apocalyptic material that developed within the Jewish community, great emphasis was given to the war of Gog and Magog as prophesied by Ezekiel,23 and to other apocalyptic traditions from Second Temple times that were in various ways used to expand this prophecy.
These expansions on Ezekiel’s prophecy of Gog of the Land of Magog came to the fore in Talmudic and medieval times in the form of the expectation of a great war, an Armageddon,24 between the forces of Gog and Magog, now described as two separate kings, and the messiah.25 Gog and Magog first appear as separate eschatological entities in the Sibylline Oracles (3:319, 512). Sib. Oracle 3 most probably dates to between 163–45 b.c.e.26 Thereafter, this notion is found in the New Testament (Rev. 20:8–9) where the two, Gog and Magog, will ally themselves with Satan against the righteous.27 These battles, to be fought at the end of days, carried on the tradition of apocalyptic war from the Second Temple period, and also involve the destruction of the Gentile enemies of Israel. The forces of the messiah are almost defeated by the forces of Gog and Magog, joined by all the nations of the world, but God’s miraculous, direct intervention brings about the victory of the messiah and the forces of good. These warlike ideas have been seen as simply the outlet for an oppressed population yearning for revenge,28 but we need to remember that they are a direct continuation of trends formed in Second Temple times in a period in which the Hasmonean House was at its height of independent Jewish power. Later circumstances may have nourished these notions but do not account for their origins.
A number of sources indicate that the expectation of a great war of Gog and Magog was carried over into early Rabbinic Judaism. M. Ed. 2:10 speaks of the punishment of Gog and Magog as lasting for twelve months. Sifrei Deut. 35729 speaks of God’s showing Moses the Plain of Jericho where Gog and his armies will fall. Targum Yerushalmi to Num. 11:26 attributes a prophecy to Eldad and Medad to the effect that in the end of days Gog and Magog and their armies will fall to the King Messiah.30 Targum to Song of Songs 8:8–9 speaks of Israel’s victory as resulting not from superior force but from the merit of Torah study.
This theme is also taken up in the Babylonian Talmud. According to Berakhot 12b–13a, the war of Gog and Magog is hinted at in Isa. 43:19 and will be a greater tribulation than any Israel has experienced.31 Similar is the theme of Ex. Rab. 12:232 that there will be a war such as that associated with the ten plagues (Ex. 9:18) in the days of Gog and Magog. Lev. Rab. 27:1133 tells us that Gog and Magog will attempt to defeat God Himself even before they attack Israel.
All the notions we see here are in consonance with the general reentry of apocalyptic ideas into rabbinic tradition in amoraic times.34 Post amoraic texts, most from late Byzantine or early Moslem times, lay out the future eschatological war in much more complex terms.
War in Medieval Eschatology
A variety of post-Talmudic texts expanded greatly on these ideas and converted them into full-scale apocalypses. These texts, or their sources, were composed in the years during which the Persian Empire was battling Byzantium in the early seventh century or in the years immediately before and after the conquest of the Byzantine Empire by the Arabs. These events greatly stimulated apocalyptic messianism in the Jewish community.35
An important early example of this genre is Sefer Zerubbabel.36 An angel, Michael or Metatron, reveals the eschatological secrets to Zerubbabel, including the expected war of Gog and Magog in which the messiah, son of Joseph (Cf. Sukkah 52a and Targum Ps. Jon. Exod. 40:11), is killed and the Davidic messiah, with the help of his mother Hephzi-Bah, eventually defeats the forces of evil headed by Armilus. This victory is essentially that of the Jewish people over the Christian Roman (Byzantine) Empire. This text, because of its early date, seems to have influenced many of the later medieval Jewish apocalypses, but the absence of some of its specific details in the other accounts argues against direct dependence.37 The revelation of secrets by a heavenly being is typical of Second Temple apocalyptic literature. 38
Aggadat Bereshit39 pictures Gog as deciding that his only hope is to directly and initially attack the Holy One, blessed be He, but, of course, God defeated him easily. Midrash Tehillim40 pictures a more systemic type of battle. Here, Gog and Magog are expected to attack Israel three times, and in the fourth battle to attack Jerusalem and Judah, but God will help the men of Judah to defeat them.
A full apocalyptic account appears in a small text entitled Sefer Eliyahu u-Firqe Mashiah.41 This is truly an apocalyptic text involving the divulging of secrets of the future by a heavenly being, Michael, to the prophet Elijah. It also has the familiar ingredient of the heavenly guided tour, which typifies what scholars now call the apocalyptic genre.42
Here the last king of Persia will go up to Rome for three years and then rebel against Rome for an additional twelve months. He will defeat mighty warriors from the sea, and then another king will arise from the sea and shake the world. He will then come to the Temple Mount and burn it, leading to suffering and war in Israel.
A certain Demetrus, son of Poriphus, and Anphilipus, son of Panapos, will wage a second war, each with 100,000 cavalry and 100,000 infantry. 300,000 soldiers will be hidden in ships. Then the messiah, named Yinnon,43 will come. Gabriel will descend, slay 92,000 men, and devastate the world. A third war will then take place, and many will be killed in the land of Israel. Then the messiah will come with the angels of destruction and later with 30,000 righteous men, destroying all Israel’s enemies. This will bring an end to the rule of the four kingdoms and usher in a period of prosperity and rejoicing. Then God will bring Gog and Magog and their legions, and they and all the peoples will surround and attack Jerusalem, but the messiah, with God’s help, will fight them and defeat them.
The notion of the 70 nations, that is, all the nations of the world, making war against Jerusalem is also found in Zohar 2:58b. But here God uproots them from the world. The text even suggests that in order to reveal His greatness, God will reassemble all the enemies of Israel and defeat them at the coming of the messiah.
A final, extensive example is Midrash Alpha Betot.44 After the messiah gathers the exiles to Jerusalem and rebuilds the Temple, and all the nations recognize his rule, peace and security will reign for 40 years. Then, in order to destroy the forces of evil, God will bring Gog and Magog to attack the land of Israel and launch three wars against Israel, having spent seven years assembling a mighty, well-armed force. The invasion will be massive, entering the land from the north. Israel will soon be conquered, all cities and towns taken, and their riches despoiled.
Then the messiah and the pious will make war against them and a great slaughter will ensue. God will enter the battle bringing plagues like those of Egypt and heavenly fires will burn the forces of Gog and Magog. Along the way we learn that the messiah is called Ephraim, and so it appears that we deal with a messiah, son of Joseph, who appears to be victorious.45 Then the inhabitants of Jerusalem will despoil their attackers and fill Jerusalem with the weapons and riches of Gog and Magog. The weapons will be burnt as fuel and the bodies of Gog and Magog and their armies will be eaten by animals, and their blood drunk. Then Israel will bury them and cleanse the entire land.
In various medieval texts, the evil king Armilus leads the forces of the nations against Israel and the messiah in the great battle of the end of days.46 His name seems to derive from Romulus, the legendary founder of ancient Rome.47 He is mentioned in the Targum to Isa. 11:4, where “rasha” is defined as “the wicked Armilus.” He appears also in Tg. Pseudo-Jonathan to Deut. 34:3, which also refers to the troops of Gog and to their battles with Michael.48 In some texts, Armilus kills the messiah, son of Joseph, but is himself killed by the Davidic messiah. Tefillat R. Shimon ben Yohai49 assumes that Nehemiah is equivalent to the messiah, son of Joseph, and that there will be a big battle occasioned by Armilus’ messianic claims. A number of texts stress his ugly, deformed physical appearance.50
In this context, it is usual to assume that the notion of wars taking place at the onset of the end of days is consistent with the apocalyptic, catastrophic form of Jewish messianism and not with the naturalistic approach.51 Yet this apocalyptic notion seems to have made its way into mainstream medieval Rabbinic thought. Sa’adya Gaon (Emunot ve-De’ot 8:5–6)52 sets out the entire messiah, son of Joseph/Armilus battle myth53 as an option that would take place if Israel did not repent on its own. If it did, however, the messiah son of David would destroy Armilus directly and then fight the battle of Gog and Magog. In any case, Sa’adya seems to assume a messianic battle.54
Even Maimonides, a member of the rationalistic, naturalistic school of Jewish messianism, fully expects wars to take place at the onset of the end of days. In describing the nature of the messianic era and of the process that will usher it in, Maimonides, Hilkhot Melakhim 11:4, after making clear that he espouses the gradualistic, natural form of Jewish messianism (11:3, 12:1–2), tells us that to attain the state of “presumptive messiah” (hezkat mashiah), the messiah will have to fight “the wars of the Lord.”55 Such wars clearly refer to the defeat of the enemies of Israel who oppose the fulfillment of God’s will in the world. In 12:2, Maimonides tells us that the messianic era will be inaugurated with the battle of Gog and Magog, in accord with the prophecies in Ezekiel.56 But clearly, for Maimonides these prophecies are understood to refer to the messiah’s role as the deliverer of Israel from foreign domination. So we can expect that this is a reference to wars of a very different sort from the apocalyptic battles that we have seen described in other texts. Here God is not a soldier, even if His help is hoped for and expected. It seems, therefore, that the expectation of war in the end of days in which the evildoers would be destroyed and in which the enemies of Israel would be defeated was actually common to both the apocalyptic and naturalistic forms of medieval Jewish messianism.57