Daniel 7 (the seventh chapter of the Book of Daniel) tells of Daniel's vision of four world-kingdoms replaced by the kingdom of God. Four beasts come out of the sea, the Ancient of Days sits in judgement over them, and "one like a son of man" is given eternal kingship. An angelic guide interprets the beasts as kingdoms and kings, the last of whom will make war on the "holy ones" of God, but he will be destroyed and the "holy ones" will be given eternal dominion.
It is generally accepted that the Book of Daniel is a product of the mid-2nd century BC. It is an apocalypse, a literary genre in which a heavenly reality is revealed to a human recipient; it is also an eschatology, a divine revelation concerning the moment in which God will intervene in history to usher in the final kingdom. Its context is oppression of the Jews by the Seleucid ruler Antiochus IV, who outlawed Jewish customs and built an altar to Zeus in the Temple (the "abomination of desolation"), sparking a popular uprising which led to the retaking of Jerusalem and the Temple by Judas Maccabeus. Chapter 7 introduces the theme of the "four kingdoms", which is that Israel would come under four successive world-empires, each worse than the last, until finally God would end oppression and introduce the eternal kingdom.
In the first year of Belshazzar, king of Babylon (probably 553 BC), Daniel receives a dream-vision from God. He sees the "great sea" stirred up by the "four winds of heaven," and from the waters emerge four beasts, the first a lion with the wings of an eagle, the second a bear, the third a winged leopard with four heads, and the fourth a beast with ten horns, and a further horn appeared which uprooted three of the ten. As Daniel watches, the Ancient of Days takes his seat on the throne of heaven and sits in judgement in the midst of the heavenly court, the fourth and worst beast is put to death, and a being like a human ("like a son of man") approaches the Ancient One in the clouds of heaven and is given everlasting kingship. A heavenly being explains the vision: the four beasts are four earthly kings (or kingdoms), "but the holy ones of the Most High shall receive and possess the kingdom forever." Regarding the fourth beast, the ten horns are ten kings of this last and greatest earthly kingdom; the eleventh horn (king) will overthrow three kings and make war on the "holy ones of God", and attempt to change the sacred seasons and the law he will have power "for a time, two times and a half", but when his allotted time is done he will be destroyed, and the holy ones will possess the eternal kingdom.