Babylonia had replaced *Assyria as Egypt's great enemy when *Assyria fell to the Medes and the Babylonians with the sack of Nineveh, in 612 BC. The kings of the Twenty-sixth Dynasty now faced a new threat, and although *Necho II of Egypt had strengthened his country's hold on Syria/Palestine in the early years of his reign, it is recorded in a Babylonian Chronicle, that the Egyptian army was completely defeated at Carchemish in 605 BC. Here, Nebuchadrezzar had fought on behalf of his father, *Nabopolassar, and had succeeded in taking all Egypt's territorial possessions in the area and destroying her Asiatic empire.
Shortly after this victory, *Nabopolassar died and Nebuchadrezzar returned to Babylon to claim the throne, before he marched again to campaign in Syria. In 604 BC, he attacked and sacked Askelon, whose people appealed to Egypt for help, but there is no record that any aid was sent.
In 601 BC, it is reported that Nebuchadrezzar once again set out to deal with Egypt, but he encountered heavy losses and probably returned to Babylon so that the conflict between the two powers was delayed for some time. *Necho II's successor, *Psammetichus II, pursued a peaceful policy, but when he was followed as king by *Apries in 589 BC, Zedekiah of Judah rebelled against Nebuchadrezzar and Egypt was again involved in the conflict.
In 587 BC, the Babylonians captured and destroyed Jerusalem, Zedekiah was taken prisoner, and a large proportion of the city's population was deported to Babylon. Some of those left behind went to Egypt and the prophet Jeremiah accompanied them.
None of *Apries' actions in this conflict are clearly reported in any of the records, and the military entanglements between the Babylonians and the next Egyptian king, *Amasis, are equally obscure. A cuneiform fragment in the British Museum recalls that Nebuchadrezzar engaged *Amasis in further hostilities in 568-567 BC. Nebuchadrezzar defeated Tyre in 574 BC, and was successful in creating a strong Babylonian influence in Syria/Palestine, but his country's power waned under his weak successors.
The last Babylonian king, Nabonidus, was overthrown in 539 BC by Cyrus II (the Achaemenid ruler) who had already conquered Media, Lydia and the cities of the Ionian coast. When Cyrus occupied Babylon, he dealt kindly with Nabonidus and exiled him to Carmania.
BIBL. Wiseman, D.J. Chronicles of Chaldaean Kings. London: 1956, pp 5 ff; Kienitz, F.K. Diepolitische. pp. 18 ff.
Biographical Dictionary of Ancient Egypt by Rosalie and Antony E. David
Ancient Egypt. A Reference Guide. EdwART. 2011.