The Neo-Babylonian Empire (626-539 BC) had reached its zenith under Nebuchadnezzar II—known best for his conquering of the kingdom of Judah, his demolition of its capital Jerusalem, and his exiling of thousands of Judeans—but under his successors Nabonidus and Belshazzar, father and coregent son, its end was imminent. The writing, it was said, was on the wall. Nabonidus had spent years away from Babylon, neglecting the expected regal cultic duties toward the city’s patron god Marduk and opting instead for an atypical devotion to the moon god Sin, while his son Belshazzar ruled in his stead. By the time Nabonidus eventually returned to Babylon (most likely out of concern for King Cyrus of Persia’s growing power in the East), his native subjects were contemptuous of him. His deported subjects, the Judeans, were soon to find reason to hate his son Belshazzar.
Cyrus had his eyes on the prize of the magnificent Babylonian capital, and he laid siege to it only three years after Nabonidus’ return. On the eve of the siege, Belshazzar, confident that the city’s walls were impregnable, celebrated a feast for a thousand of his lords. In a drunken state, he commanded that the vessels of gold and silver taken from the temple in Jerusalem be used for more drinking. It is said  that a mysterious writing on the wall of the Royal Palace appeared, bearing a foreboding inscription: Mene, God has numbered the days of your kingdom and brought it to an end; Tekel, you have been weighed on the scales and found wanting; Peres, your kingdom is divided and given to the Medes and the Persians.
Cyrus, king of the Persians, did in fact take Babylon, thus ending a very long line of independent Mesopotamian kingdoms. He was greeted as a liberator by both native Babylonian and deported Judean alike.
Miscellany: the students took their first exam on Friday.
 This is taken from the Book of Daniel, Chapter 5. Incidentally, Daniel records Belshazzar as being the son of Nebuchadnezzar, not the son of Nabonidus. This could be because in the Mesopotamian context “son of” has been known to denote “successor of” meaning, in this case, that Belshazzar was in the line of succession from Nebuchadnezzar.