And for all the mighty hand - At the time that Gog will come to the gates of Yerushalayim: for it is by way of accusation that he is aroused to come, because of the sin of Kayin.
And in the 1st time that he will come, a strong fire will be seen between the heavens and the earth for 3 days, and Gog will stand on the outside, opposite the gate, and the king Moshiach will be inside, and this fire will separate them, and they won't do anything to each other. Once he (Gog) will see that he can't attack, he will return to his place.
Afterwards, he will come a 2nd time, and then a strong darkness will be seen and much anger will be in the world, and great mountains will be broken, as it is said about them: "For the mountains will move, and the hills will collapse (Yeshayahu 54:10), and then: "And my kindness will not move from with you, etc (Isaiah 54:10). Then, Gog will go back.
But come and see, this wicked person, when time passes and he will consider being strengthened, like Par'oh the wicked did, as it is said about him "And Par'oh saw that he had an opportunity and he hardened his heart (Shemot 8:11), for he thought that the fear had left, and he could be strengthened, and if not now then after a bit of time.
Come and see, this wicked Gog will come a 3rd time certainly. But before he comes, HaKadosh Baruch Hu will rise up to take away the sin of Kayin from the world. And that is the secret of the verse "And he shall sit as a refiner" (Malachi 3:3). And because this wicked one (Gog) will come, the sin will already be gone. And that is the secret of the verse: "Why are the nations in an uproar, and the nations utter in vain" (Tehillim 2:1). Vain, for sure, that they thought they could become strengthened in that same sin (of Kayin), but behold that sin is already not to be found, and opposing this, the side of Kedushah needs to be strengthened for sure.
And all the strong hand - In the 2 (first) times that still the sin was not taken away.
And all the great terror - The refinement that (He will) refine, before the 3rd time he comes, that when he does come, it will be said about him: "The righteous are delivered from trouble, and the wicked come in his place" (Mishlei 11:8), really. And also, and all the hand, etc, is this.