Already during Ramesses XI's reign, the Twentieth Dynasty of Egypt was losing its grip on the city of Thebes, whose priests were becoming increasingly powerful.
In Thebes, a civil war engulfed the city, pitting the forces of Pedubast I, who had proclaimed himself pharaoh, against the existing line of Takelot II/Osorkon B.
Prior to Piye's Year 20 campaign into Egypt, the previous Nubian ruler – Kashta – had already extended his kingdom's influence into Thebes when he compelled Shepenupet, the serving Divine Adoratice of Amun and Takelot III's sister, to adopt his own daughter Amenirdis, to be her successor.
Then, 20 years later, around 732 BC his successor, Piye, marched north and defeated the combined forces of several native Egyptian rulers: Peftjaubast, Osorkon IV of Tanis, Iuput II of Leontopolis and Tefnakht of Sais.
Pharaohs of the dynasty, among them Taharqa, built or restored temples and monuments throughout the Nile valley, including at Memphis, Karnak, Kawa, and Jebel Barkal.
The country's international allies had fallen firmly into the sphere of influence of Assyria and from about 700 BC the question became when, not if, there would be war between the two states as Esarhaddon had realised that a conquest of Lower Egypt was necessary to protect Assyrian interests in the Levant.
Tantamani barely had the time to receive the submission of some Delta kinglets and expel the remaining Assyrians that a large army led by Ashurbanipal and Necho's son Psamtik I came back.
Tantamani's successor Atlanersa was in no position to attempt a reconquest of Egypt as Psamtik also secured the southern border at Elephantine and may even have sent a military campaign to Napata.
Concurrently, Psamtik managed to free himself from the Assyrian vassalage while remaining on good terms with Ashurbanipal, possibly owing to an ongoing rebellion in Babylon.