In 626 BC the Chaldean Nabopolassar made himself king in Babylon and, allied with the Medes, destroyed Assyria (612-609 BC) - the Neo-Babylonian (Chaldean) kingdom. Under Nebuchadnezzar II (605-562 BC) it stood at its height: in 586 BC he destroyed the temple of Jerusalem and carried the people of Judah to Babylon (the Babylonian captivity); the glazed-brick Ishtar Gate was a wonder, and the legendary Hanging Gardens were built in his reign. Its astronomy - the saros cycle and the planetary records - ran deep, feeding later the Ptolemaic system. The last king Nabonidus alienated the land with his religious reforms; in 539 BC Cyrus the Great entered Babylon without a battle, the kingdom fell, and the independent history of the two rivers came to its end.