also seen the beginning of rebellious movements in Babylonia (precursors of that of Nabopolassar). Egypt already regained independence in the middle of Ashurbanipal's reign. Egypt appears to have been liberated peacefully and gradually under Necho I's son and successor Psamtik I, who had been educated at the Assyrian court. After becoming king in 664 as a loyal Assyrian vassal, Psamtik slowly extended his control across all of Egypt, unifying the country in 656 and initiating a period of renaissance and prosperity, eventually becoming fully independent of Ashurbanipal. Psamtik remained an ally of Assyria; during the later Medo-Babylonian conquest of the Assyrian Empire in the reign of Sinsharishkun (Ashur-etil-ilani's successor and another son of Ashurbanipal) both Psamtik and his son Necho II rushed to Assyria's aid, with Egyptian armies fighting alongside the Assyrians. Inscriptions by Ashur-etil-ilani suggest that his father died a natural death, but do not shed light on when or how this happened. Though his final year is often erroneously given as 627 or even 626, this follows an estimate from an inscription written nearly a century later at Harran by Adad-guppi, the mother of the Neo-Babylonian king Nabonidus (). The final contemporary evidence for Ashurbanipal being alive and reigning as king is a contract from Nippur made in 631. If Ashurbanipal's reign had ended in 627 the inscriptions of his successors Ashur-etil-ilani and Sinsharishkun in Babylon (covering several years) would have been impossible, given that the city was seized by Nabopolassar in 626 and never again fell into Assyrian hands. To get the attested lengths of the reigns of his successors to match, it is generally agreed that Ashurbanipal either died, abdicated or was deposed in 631 or 630. 631 is typically favored as the year of his death. Ashurbanipal was succeeded as king by Ashur-etil-ilani and he seems to have been inspired by the succession plans of his father, despite its consequences, given that Sinsharishkun was granted the fortress-city of Nippur and was designated to be the successor of Kandalanu at Babylon once Kandalanu died. A handful of historians have attempted to justify a reign of Ashurbanipal extending to 627, though no such proposal is without problems. It is possible that the 42-year (rather than 38-year) error came about in later Mesopotamian historiography on account of the knowledge that Ashurbanipal ruled concurrently with Babylonian rulers Shamash-shum-ukin and Kandalanu, whose reigns together amount to 42 years, but Kandalanu