The Revelator wrote: “And when the thousand years are expired, Satan shall be loosed out of his prison, and shall go out to deceive the nations which are in the four quarters of the earth, Gog and Magog, to gather them together to battle: the number of whom is as the sand of the sea” (Revelation 20:7-8). ’Satan shall be bound, “ the Lord explained,”that old serpent, who is called the devil, and shall not be loosed for the space of a thousand years. And then he shall be loosed for a little season, that he may gather together his armies.
And Michael, the seventh angel, even the archangel, shall gather together his armies, even the hosts of heaven. And the devil shall gather together his armies; even the hosts of hell, and shall come up to battle against Michael and his armies. And then cometh the battle of the great God [the Battle of Gog and Magog, a final struggle between good and evil at the end of the Millennium-Teachings, p. 280]; and the devil and his armies shall be cast away into their own place, that they shall not have power over the saints any more at all.“ (D&C 88:110-14.) The destruction of the wicked at the time of the Second Coming is known as the ”end of the world“ (Joseph Smith Matthew 1:4, 31, 55). The final destruction of Satan and his hosts-the Battle of Gog and Magog-results in the ”end of the earth“ (D&C 43:31; D&C 88:101; Joseph Smith Matthew 1:55).”