This dynasty traced its origins to the 24th Dynasty. Psamtik I was probably a descendant of Bakenrenef, and following the Assyrians' invasions during the reigns of Taharqa and Tantamani, he was recognized as sole king over all of Egypt. While the Assyrian Empire was preoccupied with revolts and civil war over control of the throne, Psammetichus threw off his ties to the Assyrians circa 655 BC, and formed alliances with Gyges, king of Lydia, and recruited mercenaries from Caria and Greece to resist Assyrian attacks.
With the sack of Nineveh in 612 BC and the fall of the Assyrian Empire, both Psamtik and his successors attempted to reassert Egyptian power in the Near East, but were driven back by the Babylonians under Nebuchadnezzar II. With the help of Greek mercenaries, Apries was able to hold back Babylonian attempts to conquer Egypt, only for the Persians to eventually do so. Their king, Cambyses II, captured and later executed Psamtik III.