Revelation 20:4-9 King James Version (KJV)
4 And I saw thrones, and they sat upon them, and judgment was given unto them: and I saw the souls of them that were beheaded for the witness of Jesus, and for the word of God, and which had not worshipped the beast, neither his image, neither had received his mark upon their foreheads, or in their hands; and they lived and reigned with Christ a thousand years.
5 But the rest of the dead lived not again until the thousand years were finished. This is the first resurrection.
6 Blessed and holy is he that hath part in the first resurrection: on such the second death hath no power, but they shall be priests of God and of Christ, and shall reign with him a thousand years.
7 And when the thousand years are expired, Satan shall be loosed out of his prison,
8 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.
9 And they went up on the breadth of the earth, and compassed the camp of the saints about, and the beloved city: and fire came down from God out of heaven, and devoured them.
Revelation 20:4-9 New International Version (NIV)
4 I saw thrones on which were seated those who had been given authority to judge. And I saw the souls of those who had been beheaded because of their testimony about Jesus and because of the word of God. They[a] had not worshiped the beast or its image and had not received its mark on their foreheads or their hands. They came to life and reigned with Christ a thousand years. 5 (The rest of the dead did not come to life until the thousand years were ended.) This is the first resurrection. 6 Blessed and holy are those who share in the first resurrection. The second death has no power over them, but they will be priests of God and of Christ and will reign with him for a thousand years.
The Judgment of Satan
7 When the thousand years are over, Satan will be released from his prison 8 and will go out to deceive the nations in the four corners of the earth—Gog and Magog—and to gather them for battle. In number they are like the sand on the seashore. 9 They marched across the breadth of the earth and surrounded the camp of God’s people, the city he loves. But fire came down from heaven and devoured them.