Gog makes his plans in secret. He thinks his strategies are hidden — the alliance-building, the schemes against Israel, the invasions planned in quiet rooms. "On that day, thoughts will arise in your heart," the prophet Ezekiel warned him, "and you will devise an evil plan" (Ezekiel 38:10). But the Holy One cuts him off before he finishes the thought: I know what you're planning.
The rabbis of Aggadat Bereshit return to an old puzzle: if God created 248 organs in the human body, why does the heart alone disobey? Every organ acts according to its nature — the eye sees, the ear hears, the hand grasps. But the heart twists. Jeremiah said it plainly: "The heart is deceitful above all things and desperately wicked; who can know it?" (Jeremiah 17:9). Even the person carrying the heart cannot predict it.
This is the context for Sodom's destruction, which Abraham watched with his own eyes (Genesis 18-19). God didn't destroy Sodom because of what they did only. He destroyed it because of what they intended. Sodom's heart had already gone somewhere no community could return from. Abraham bargained for the righteous — "Far be it from You to do such a thing!" — and God listened, long enough to confirm that not even ten could be found. The destruction wasn't punishment. It was diagnosis. And Abraham, standing at the edge of the smoke and ruin, had to learn the hardest lesson any patriarch learns: some things cannot be interceded away.
Chapter 2: Prophets. [1] Thus says the Lord God, "On that day, thoughts will arise in your heart, and you will devise an evil plan." (Ezekiel 38:10) The Holy One, blessed be He, said to Gog, "Do not say that which you are thinking in your heart, as if I do not know. Jeremiah said, 'The heart is deceitful above all things and desperately wicked; who can know it?' (Jeremiah 17:9) I said to him, 'I created 248 organs in man, and all of them act according to their nature as I created them, except for the heart. The heart changes from moment to moment and twists itself. It is crooked and deceitful above all things.' The heart is crooked and deceitful above all things, and who can know it? I am the Lord who searches the heart (Jeremiah 17:10). I created you, and I know what you are. Do not say that since I created you, I know your heart. Even before I created you, I knew what you would think." This is why David commanded Solomon his son, saying, "And you, Solomon my son, know the God of your father and serve Him with a perfect heart and with a willing mind" (1 Chronicles 28:9). Why? Because the Lord searches all hearts and understands every intent of the thoughts (ibid). Rabbi Acha said, "What is the meaning of 'and understands every intent of the thoughts'? Even before a man forms his thoughts in his heart, the Holy One, blessed be He, knows what he is going to think." This is what He said to Sennacherib, "Because you rage against Me, and your arrogance has come up to My ears, therefore I will put My hook in your nose and My bridle in your lips, and I will turn you back by the way which you came" (Isaiah 37:29). Even before I created you, I knew what you were going to do, as it is said, "And your going out and your coming in I know" (ibid. 37:28), "When you made yourself stand up from your throne and do repentance, as it says 'The matter reached the king of Nineveh, and he arose from his throne, and removed his robe, and covered himself with sackcloth, and sat in ashes.' (Jonah 3:6) But because you became angry with me, as it says 'Because you raged against me...' (Isaiah 37:29), Rabbi Hiyya bar Kahana asked, 'What caused you to become angry with me?' God replied, 'Because I gave you peace and quiet. If you had been a launderer with a basket in your hand and a hoe on your shoulder and cleaning a pit, you would not have angered me.' Therefore it is said, 'Because you became angry, for what reason, and your arrogance has reached my ears.' (Isaiah 37:28) And what should I do? I will put my hook in your nose and my bit in your mouth (Isaiah 37:29), like how one leads a donkey. I did the same with Gog, as it says 'I am against you, Gog... and I will turn you back and put hooks into your jaws...' (Ezekiel 38:3-4). God said to him, 'Do not say that I do not know what you were destined to do. Look, I said to you many generations before.'" "As it is said, thus says the Lord God: Are you the one of whom I spoke in former days by my servants the prophets of Israel, who in those days prophesied for years that I would bring you against them? (Ezekiel 38:17) Do not say 'years,' but rather 'generations.' Many generations ago, I spoke to Eldad and Medad, who prophesied about you, as it is written, 'And there remained two men in the camp, the name of one was Eldad, and the name of the other was Medad: and the spirit rested upon them; and they were of them that were written, but went not out unto the tabernacle: and they prophesied in the camp' (Numbers 11:26). What does it mean that 'they prophesied, and did not continue'? They prophesied and said that after Gog and Magog there would be no more exile or servitude. Many generations before you, they prophesied about you. And not only that, but Ezekiel also prophesied about what you are planning in your heart, as it is written, 'Thus says the Lord God: It shall also come to pass, that at the same time shall things come into thy mind, and thou shalt think an evil thought' (Ezekiel 38:10). Therefore it is said, 'Scoffers set a snare for thyself' (Proverbs 9:12). I, the Lord, search the heart, I search it's thoughts (Jeremiah 17:10)." [2] Another interpretation: "Things will come to your heart." Everything is first considered in the heart. Esau did this, as it is said, "And Esau said in his heart" (Genesis 27:41). Nebuchadnezzar did this, and you also said in your heart, "I will ascend to heaven; I will raise my throne above the stars of God" (Isaiah 14:13). Haman did this, as it is said, "Haman went out that day joyful and with a glad heart. But when Haman saw Mordecai in the king's gate, that he did not stand or tremble before him, he was filled with wrath against Mordecai" (Esther 5:9-13). The kingdom of Sodom did this, as it is said, "And now, O inhabitants of Jerusalem and men of Judah, judge, please, between Me and My vineyard. What more could have been done to My vineyard that I have not done in it? Why then, when I expected it to bring forth good grapes, did it bring forth wild grapes?" (Isaiah 5:3-4). Likewise, Gog did this, as it is said, "Let things come to your heart and put evil schemes into your mind" (Ezekiel 38:10). Everything he thought in his heart, the Holy One, blessed be He, made public. And what Esau thought, see later at the end of chapter 42 [of Genesis]. He went to Ishmael and said, "This is not the way of the world that I should kill my father Isaac. Rather, kill him and let me inherit the entire world." This is what he said with his mouth, but in his heart he was saying, "I will kill Jacob after Ishmael kills Isaac." He came to Ishmael and killed him and said, "Why did you kill my father?" And I will inherit the entire world for myself." He thought this in his heart, and the Holy One, blessed be He, made it public, as it is said, "For I have laid bare Esau's rugged mountains and his dwelling place" (Jeremiah 49:10). The Lord said, "I know what you thought in your heart," as it is said, "Because you said, 'These two nations and these two lands shall be mine, and we will possess them,' whereas the Lord was there" (Ezekiel 35:10). There I looked into your heart and saw what you thought. Likewise, Gog and Magog think in their hearts, as it is said, "On that day, things will come to your heart and you will plan an evil plan" (Ezekiel 38:10). And the Holy One, blessed be He, makes public what they are thinking, as it is said, "And you said, 'I will go up to the land of unwalled villages; I will go to those who are at rest, who dwell safely, all of them dwelling without walls and having neither bars nor gates'" (Ezekiel 38:11). And what does he think? Rather, this is what Pharaoh, who came against the Israelites, says: "He [Moses] was a fool, he left his patron and came to them." And similarly, Amalek, Sisera, and anyone who stood against them [the Israelites], they left [it] to the Holy One, blessed be He, [to deal with them], [because] they were fools. But what can I do? I will go first to the patrons of Israel, and if I kill the Messiah, he will raise up other Messiahs. But [the judgment] is upon the Lord, as it says, "Why do the nations rage and the peoples plot in vain?" (Psalms 2:1-2). Edom, Ishmael, Gebal, Ammon, and Assyria all conspired against the Almighty, as it is written, "They have taken crafty counsel against Your people, and consulted together against Your sheltered ones" (Psalms 83:3). And what do they do? They stand on their feet and look up at the Almighty, saying, "Come, let us cut them off from being a nation, that the name of Israel may be remembered no more" (Psalms 83:5). What is the name of Israel? They say, "Let us wipe it out," as it is written, "Blessed is the Eternal, God of Israel" (Psalms 41:14). And what does the Lord do to them from above? He stands on their feet and punishes them, as it is written: "And this shall be the plague...he shall stand upon his feet, and his eyes shall consume away in their holes, and his tongue shall consume away in his mouth." (Zechariah 14:12). Those feet that wanted to stand against Me, the plague consumes them while they stand on their feet. Those eyes that looked upwards, his eyes shall consume away in their holes. And that tongue that spoke against Me, his tongue shall consume away in his mouth. The Lord said to them: "At first, there was no peace among you, 'There is no peace,' says the Lord, 'for the wicked'" (Isaiah 48:22). But now you have made peace with each other to come against Me. It is written, "For they have consulted together with one consent; against thee do they make a covenant: The tabernacles of Edom, and the Ishmaelites; of Moab, and the Hagarenes; Gebal, and Ammon, and Amalek; the Philistines with the inhabitants of Tyre; Assur also is joined with them: they have holpen the children of Lot. Selah." (Psalm 83:6-9). All of you have made peace to come against Me, so I will also do the same. And you, son of man, shall say to the birds and to every beast of the field: "Assemble yourselves, and come; gather yourselves on every side to my sacrifice that I do sacrifice for you, even a great sacrifice upon the mountains of Israel, that ye may eat flesh, and drink blood." (Ezekiel 39:17). Just as you did not have peace with each other and made peace to come upon me, so too I call the birds and animals that did not have peace with each other and I make peace between them to come upon you. And because you said, "And let not the name of Israel be remembered anymore," (Psalm 83:5) your life will end and they will bury you and take your name away from the world, as it is said, "all the people of the land shall bury them. The day I manifest My glory shall bring renown to them", and they shall make an end. (Ezekiel 39:13)