We just read how the prophecies of Nahum were fulfilled in the destruction of Nineveh. The Assyrian Empire came to an end, at the hands of the Babylonians and Medians. The Babylonians quickly exerted its power over Media also, so that the Babylonians inherited the vast empire of the Assyrians and all its vassal states.
Now the Egyptians were the first to challenge Babylonian authority. But as Pharaoh was on his way to engage them, at Carchemish on the Euphrates River, King Josiah of Judah made an attempt to stop him, for the Babylonians had been allies of Judah ever since the reign of King Hezekiah.
The Judean army met the Egyptians at Megiddo, where Josiah received a mortal wound, and he died almost as soon as he reached Jerusalem (610 bc). The prophet Jeremiah wrote the Book of Lamentations by the Spirit of the LORD, to mourn his death, and all Judah with him.
So what happened with the Egyptians? They continued on their journey to meet the Babylonian army. The Babylonian general, Nebuchadnezzar, was the son of the king, and he was proving to be a great strategist. More than one battle was fought with the Babylonians, over the course of several years, but eventually the Egyptians were defeated, and Egypt, although not tributary to Babylon under Pharaoh Necho’s reign, had its hands full repelling the Babylonians from its own borders.
For further reading:
Necho II – Wikipedia