2 Kings 24:7
And the king of Egypt came not again any more out of his land: for the king of Babylon had taken from the river of Egypt unto the river Euphrates all that pertained to the king of Egypt. And the king of Egypt came not again any more out of his land: for the king of Babylon had taken from the river of Egypt unto the river Euphrates all that pertained to the king of Egypt.
The king of Egypt came not again any more out of his own land to reclaim his former territory, because the king of Babylon had taken all that pertained to the king of Egypt from the river of Egypt unto the river Euphrates, ending Egyptian power and control in that region. The territory so taken was all the former Assyrian possessions west of the Euphrates, including the stronghold at Carchemish, extending even to the very border of Egypt itself. Egypt had received those possessions as her share in the division of Assyria after helping Babylonia and Media destroy Assyria, and lost them to Babylon in 598 B.C. The immediate cause was Nebuchadnezzar's defeat of Pharaoh-Necho's army at Carchemish, after which the king of Egypt no longer advanced beyond his own land.
The setting is Nebuchadnezzar's campaigns against Judah and Egypt, in which Pharaoh Hophra sent help to Zedekiah and was defeated, and Nebuchadnezzar later desolated Egypt. The verse places Judah's fall within Babylon's rise, marking Babylon's conquest of Egyptian-held territory during the events leading to Jerusalem's fall and Judah's captivity into Babylonian captivity under Nebuchadnezzar. The chapter records the Babylonian conquests associated with Judah's successive captivities.
In that occupation of Judah by Nebuchadnezzar's army, with Jerusalem under siege, Jehoiachin was dethroned by the king of Babylon after three months and Jehoiakim's brother was placed on the throne in his stead. Nebuchadnezzar came against Jerusalem in the reign of Jehoiakim king of Judah, took the city, and carried away some of the chief men to Babylon, among whom were Daniel and his three companions.